File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5189,9 +5189,11 @@ void Tokenizer::simplifyFunctionPointers()
51895189 continue ;
51905190 while (Token::Match (tok2, " (|:: %type%" ))
51915191 tok2 = tok2->tokAt (2 );
5192- if (!Token::Match (tok2, " (|:: * %name%" ))
5192+ if (!Token::Match (tok2, " (|:: * *| %name%" ))
51935193 continue ;
51945194 tok2 = tok2->tokAt (2 );
5195+ if (tok2->str () == " *" )
5196+ tok2 = tok2->next ();
51955197 while (Token::Match (tok2, " %type%|:: %type%|::" ))
51965198 tok2 = tok2->next ();
51975199
Original file line number Diff line number Diff line change @@ -1000,7 +1000,7 @@ class TestSimplifyTypedef : public TestFixture {
10001000 " class X { } ; "
10011001 " int main ( ) "
10021002 " { "
1003- " X ( * * Foo ) ( const X & ) ; Foo = new X ( * ) ( const X & ) [ 2 ] ; "
1003+ " X * * Foo ; Foo = new X ( * ) ( const X & ) [ 2 ] ; "
10041004 " }" ;
10051005
10061006 ASSERT_EQUALS (expected, tok (code, false ));
@@ -2990,8 +2990,8 @@ class TestSimplifyTypedef : public TestFixture {
29902990 " { "
29912991 " int Format_T2 ; "
29922992 " } "
2993- " int ( * * t1 ) ( ) ; "
2994- " int ( * * t2 ) ( ) ;" ,
2993+ " int * * t1 ; "
2994+ " int * * t2 ;" ,
29952995 tok (code,false ));
29962996 }
29972997
You can’t perform that action at this time.
0 commit comments