forked from qt-creator/qt-creator
C++: Fix variable template parsing in expression
Fix parser to not fail on TemplateId without parentheses, for example: int i = foo<int> + foo<char>; This fixes std::pair structure parsing in MSVC headers and find Usages to work with pair->first and pair->second. Change-Id: Ic300ea99d44a749705430d5eb47b2744715af995 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
6
src/libs/3rdparty/cplusplus/Parser.cpp
vendored
6
src/libs/3rdparty/cplusplus/Parser.cpp
vendored
@@ -5066,12 +5066,6 @@ bool Parser::parseNameId(NameAST *&name)
|
||||
case T_CONST_CAST:
|
||||
rewind(start);
|
||||
return parseName(name, false);
|
||||
|
||||
default:
|
||||
if (tok().isLiteral() || tok().isPunctuationOrOperator()) {
|
||||
rewind(start);
|
||||
return parseName(name, false);
|
||||
}
|
||||
} // switch
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user