File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -542,7 +542,7 @@ Token *Tokenizer::processFunc(Token *tok2, bool inOperator) const
542542
543543 if (tok2->str () == " (" &&
544544 tok2->link ()->next () &&
545- tok2->link ()->next ()->str () == " (" ) {
545+ tok2->link ()->next ()->str () == " (" ) {
546546 tok2 = tok2->link ();
547547
548548 if (tok2->next ()->str () == " (" )
@@ -552,8 +552,7 @@ Token *Tokenizer::processFunc(Token *tok2, bool inOperator) const
552552 // skip over typedef parameter
553553 if (tok2->next () && tok2->next ()->str () == " (" ) {
554554 tok2 = tok2->next ()->link ();
555- if (!tok2->next ())
556- {
555+ if (!tok2->next ()) {
557556 syntaxError (tok2);
558557 return nullptr ;
559558 }
@@ -1530,8 +1529,8 @@ void Tokenizer::simplifyTypedef()
15301529
15311530 simplifyType = false ;
15321531 }
1533- if (!tok2)
1534- break ;
1532+ if (!tok2)
1533+ break ;
15351534 }
15361535
15371536 if (tok->str () == " ;" )
Original file line number Diff line number Diff line change @@ -115,9 +115,9 @@ class TestGarbage : public TestFixture {
115115 TEST_CASE (garbageCode74);
116116 TEST_CASE (garbageCode75);
117117 TEST_CASE (garbageCode76);
118- TEST_CASE (garbageCode77);
119- TEST_CASE (garbageCode78);
120- TEST_CASE (garbageCode79);
118+ TEST_CASE (garbageCode77);
119+ TEST_CASE (garbageCode78);
120+ TEST_CASE (garbageCode79);
121121
122122 TEST_CASE (garbageValueFlow);
123123 TEST_CASE (garbageSymbolDatabase);
@@ -643,15 +643,15 @@ class TestGarbage : public TestFixture {
643643 checkCode (" ( ) ( ) { ( ) [ ] } TEST ( ) { ( _broadcast_f32x4 ) ( ) ( ) ( ) ( ) if ( ) ( ) ; } E mask = ( ) [ ] ( ) res1.x =" );
644644 }
645645
646- void garbageCode77 () { // #6755
646+ void garbageCode77 () { // #6755
647647 checkCode (" void foo (int **p) { { { };>= } } unsigned *d = (b b--) --*d" );
648648 }
649649
650- void garbageCode78 () { // #6756
650+ void garbageCode78 () { // #6756
651651 checkCode (" ( ) { [ ] } ( ) { } const_array_of_int ( ) { } typedef int A [ ] [ ] ; A a = { { } { } }" );
652652 }
653653
654- void garbageCode79 () { // #6757
654+ void garbageCode79 () { // #6757
655655 ASSERT_THROW (checkCode (" { } { } typedef void ( func_type ) ( ) ; func_type & ( )" ), InternalError);
656656 }
657657
You can’t perform that action at this time.
0 commit comments