File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4052,7 +4052,7 @@ void CheckOtherImpl::checkFuncArgNamesDifferent()
40524052 break ;
40534053 }
40544054 // skip over templates and arrays
4055- if (decl->link () && !Token::Match (decl, " [()]" ))
4055+ if (decl->link () && ( !Token::Match (decl, " [()]" ) || Token::simpleMatch (decl-> tokAt (- 1 ), " ) ( " ) ))
40564056 decl = decl->link ();
40574057 else if (decl->varId ())
40584058 declarations[j] = decl;
Original file line number Diff line number Diff line change @@ -12959,6 +12959,10 @@ class TestOther : public TestFixture {
1295912959 check("void f(void (*fp)(), int x);\n" // #14847
1296012960 "void f(void (*fp)(), int x) {}\n");
1296112961 ASSERT_EQUALS("", errout_str());
12962+
12963+ check("void f(void (*fp)(int a, int b), int b);\n" // #14853
12964+ "void f(void (*fp)(int a, int b), int b) {}\n");
12965+ ASSERT_EQUALS("", errout_str());
1296212966 }
1296312967
1296412968 void funcArgOrderDifferent() {
You can’t perform that action at this time.
0 commit comments