From 0d29fea0b3371b85c145a4f6e9fa3e7af1da21a5 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Thu, 1 Nov 2018 15:06:32 +0100 Subject: [PATCH] C++: Fix parsing enum specifier III This amends the obviously wrong aac1bebacec384a0f8dd7053c06cb3418f88c722. Fixes FAIL! : tst_Semantic::q_enum_1() Compared values are not the same FAIL! : tst_CheckSymbols::test_checksymbols(EnumerationUse) 'resultCount > 0' returned FALSE. () FAIL! : tst_CheckSymbols::test_checksymbols(VariableHasTheSameNameAsEnumUse) Compared values are not the same FAIL! : tst_CheckSymbols::test_checksymbols(enum_inside_block_inside_function_QTCREATORBUG5456) Compared values are not the same FAIL! : tst_CheckSymbols::test_checksymbols(enum_inside_function_QTCREATORBUG5456) Compared values are not the same FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_inside_block_inside_function) Compared lists have different sizes. FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_inside_block_inside_function_cxx11) Compared lists have different sizes. FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_inside_function) Compared lists have different sizes. FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_inside_function_cxx11) Compared lists have different sizes. FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_inside_class) Compared lists have different sizes. FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_inside_class_cxx11) Compared lists have different sizes. FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_inside_namespace) Compared lists have different sizes. FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_inside_namespace_cxx11) Compared lists have different sizes. FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_inside_member_function) Compared lists have different sizes. FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_inside_member_function_cxx11) Compared lists have different sizes. FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_in_class_accessed_in_member_func_inline) Compared lists have different sizes. FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_in_class_accessed_in_member_func) Compared lists have different sizes. FAIL! : CppTools::Internal::CppToolsPlugin::test_cpplocatorfilters_CppLocatorFilter(CppLocatorFilter-filtered) Compared lists have different sizes. FAIL! : CppTools::Internal::CppToolsPlugin::test_cpplocatorfilters_CppCurrentDocumentFilter() Compared lists have different sizes. FAIL! : CppTools::Internal::CppToolsPlugin::test_builtinsymbolsearcher(BuiltinSymbolSearcher::AllTypes) Compared lists have different sizes. FAIL! : CppTools::Internal::CppToolsPlugin::test_builtinsymbolsearcher(BuiltinSymbolSearcher::Enums) Compared lists have different sizes. Task-number: QTCREATORBUG-21413 Change-Id: I71ace00091e37f0a148086e5047efaec08923b1a Reviewed-by: Christian Stenger Reviewed-by: Ivan Donchevskii --- src/libs/3rdparty/cplusplus/Parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/3rdparty/cplusplus/Parser.cpp b/src/libs/3rdparty/cplusplus/Parser.cpp index 537895abd38..6bee0fa9726 100644 --- a/src/libs/3rdparty/cplusplus/Parser.cpp +++ b/src/libs/3rdparty/cplusplus/Parser.cpp @@ -1835,7 +1835,7 @@ bool Parser::parseEnumSpecifier(SpecifierListAST *&node) return false; } - if (LA() == T_COLON_COLON && LA() == T_IDENTIFIER) + if (LA() == T_COLON_COLON || LA() == T_IDENTIFIER) parseName(ast->name); if (_languageFeatures.cxx11Enabled && LA() == T_COLON) {