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 () && precedes (decl, decl-> link ()) && !Token::Match (decl, " ( [*& ]" ))
40564056 decl = decl->link ();
40574057 else if (decl->varId ())
40584058 declarations[j] = decl;
Original file line number Diff line number Diff line change @@ -12976,6 +12976,10 @@ class TestOther : public TestFixture {
1297612976 check("void f(void (*fp)(), int x);\n" // #14847
1297712977 "void f(void (*fp)(), int x) {}\n");
1297812978 ASSERT_EQUALS("", errout_str());
12979+
12980+ check("void f(void (*fp)(int a, int b), int b);\n" // #14853
12981+ "void f(void (*fp)(int a, int b), int b) {}\n");
12982+ ASSERT_EQUALS("", errout_str());
1297912983 }
1298012984
1298112985 void funcArgOrderDifferent() {
You can’t perform that action at this time.
0 commit comments