diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 44f75242f..40fdfbfc7 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -7530,8 +7530,8 @@ void Tokenizer::simplifyEnum() for (; tok1 && tok1 != end; tok1 = tok1->next()) { if (tok1->str() == "(") { tok1 = tok1->link(); - if (!tok1) - syntaxError(nullptr); // #6909 + if (!tok1) + syntaxError(nullptr); // #6909 continue; } diff --git a/test/testgarbage.cpp b/test/testgarbage.cpp index a1778283a..618b4310a 100644 --- a/test/testgarbage.cpp +++ b/test/testgarbage.cpp @@ -151,7 +151,7 @@ private: TEST_CASE(garbageCode109); TEST_CASE(garbageCode110); TEST_CASE(garbageCode111); - TEST_CASE(garbageCode112); + TEST_CASE(garbageCode112); TEST_CASE(garbageValueFlow); TEST_CASE(garbageSymbolDatabase); @@ -850,7 +850,7 @@ private: ASSERT_THROW(checkCode("enum { FOO = 1( ,) } {{ FOO }} ;"), InternalError); } - void garbageCode112() { // #6909 + void garbageCode112() { // #6909 ASSERT_THROW(checkCode("enum { FOO = ( , ) } {{ }}>> enum { FOO< = ( ) } { { } } ;"), InternalError); }