diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index c639bf27d..91dc93bb7 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -542,7 +542,7 @@ Token *Tokenizer::processFunc(Token *tok2, bool inOperator) const if (tok2->str() == "(" && tok2->link()->next() && - tok2->link()->next()->str() == "(") { + tok2->link()->next()->str() == "(") { tok2 = tok2->link(); if (tok2->next()->str() == "(") @@ -552,8 +552,7 @@ Token *Tokenizer::processFunc(Token *tok2, bool inOperator) const // skip over typedef parameter if (tok2->next() && tok2->next()->str() == "(") { tok2 = tok2->next()->link(); - if (!tok2->next()) - { + if (!tok2->next()) { syntaxError(tok2); return nullptr; } @@ -1530,8 +1529,8 @@ void Tokenizer::simplifyTypedef() simplifyType = false; } - if (!tok2) - break; + if (!tok2) + break; } if (tok->str() == ";") diff --git a/test/testgarbage.cpp b/test/testgarbage.cpp index 5a1dc4fdf..fb52822c1 100644 --- a/test/testgarbage.cpp +++ b/test/testgarbage.cpp @@ -115,9 +115,9 @@ private: TEST_CASE(garbageCode74); TEST_CASE(garbageCode75); TEST_CASE(garbageCode76); - TEST_CASE(garbageCode77); - TEST_CASE(garbageCode78); - TEST_CASE(garbageCode79); + TEST_CASE(garbageCode77); + TEST_CASE(garbageCode78); + TEST_CASE(garbageCode79); TEST_CASE(garbageValueFlow); TEST_CASE(garbageSymbolDatabase); @@ -643,15 +643,15 @@ private: checkCode(" ( ) ( ) { ( ) [ ] } TEST ( ) { ( _broadcast_f32x4 ) ( ) ( ) ( ) ( ) if ( ) ( ) ; } E mask = ( ) [ ] ( ) res1.x ="); } - void garbageCode77() { // #6755 + void garbageCode77() { // #6755 checkCode("void foo (int **p) { { { };>= } } unsigned *d = (b b--) --*d"); } - void garbageCode78() { // #6756 + void garbageCode78() { // #6756 checkCode("( ) { [ ] } ( ) { } const_array_of_int ( ) { } typedef int A [ ] [ ] ; A a = { { } { } }"); } - void garbageCode79() { // #6757 + void garbageCode79() { // #6757 ASSERT_THROW(checkCode("{ } { } typedef void ( func_type ) ( ) ; func_type & ( )"), InternalError); }