forked from qt-creator/qt-creator
C++: Fix parsing enum specifier II
This amends the obviously wrong
de975aca4f, which did not honored nameless
enum specifiers.
This fixes e.g. "Find Usages" for declarations following "enum {};".
Change-Id: Id98c074156f576b9a63e6c25dab38721ca34e496
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
4
src/libs/3rdparty/cplusplus/Parser.cpp
vendored
4
src/libs/3rdparty/cplusplus/Parser.cpp
vendored
@@ -1835,10 +1835,8 @@ bool Parser::parseEnumSpecifier(SpecifierListAST *&node)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (LA() == T_IDENTIFIER)
|
||||
if (LA() == T_COLON_COLON && LA() == T_IDENTIFIER)
|
||||
parseName(ast->name);
|
||||
else
|
||||
return false;
|
||||
|
||||
if (_languageFeatures.cxx11Enabled && LA() == T_COLON) {
|
||||
ast->colon_token = consumeToken();
|
||||
|
||||
Reference in New Issue
Block a user