diff --git a/src/libs/3rdparty/cplusplus/Parser.cpp b/src/libs/3rdparty/cplusplus/Parser.cpp index 05ac1102452..c2198b65783 100644 --- a/src/libs/3rdparty/cplusplus/Parser.cpp +++ b/src/libs/3rdparty/cplusplus/Parser.cpp @@ -1834,7 +1834,11 @@ bool Parser::parseEnumSpecifier(SpecifierListAST *&node) error(cursor(), "expected identifier before '%s'", tok().spell()); return false; } - parseName(ast->name); + + if (LA() == T_IDENTIFIER) + parseName(ast->name); + else + return false; if (_languageFeatures.cxx11Enabled && LA() == T_COLON) { ast->colon_token = consumeToken();