From 3704b6ad6a2d7362bb4add251317aa0af10b7172 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Wed, 29 Apr 2026 09:01:20 +0200 Subject: [PATCH 1/2] Update checkother.cpp --- lib/checkother.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 4628dd0d774..e63ad0d457c 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -4044,8 +4044,8 @@ void CheckOther::checkFuncArgNamesDifferent() decl = decl->nextArgument(); break; } - // skip over template - if (decl->link() && decl->str() == "<") + // skip over templates and arrays + if (decl->link() && decl->str() != "(") decl = decl->link(); else if (decl->varId()) declarations[j] = decl; From 5c5cf427eaeefb51d7d3bc8fe53610f83d794cf1 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Wed, 29 Apr 2026 09:02:24 +0200 Subject: [PATCH 2/2] Update testother.cpp --- test/testother.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/testother.cpp b/test/testother.cpp index 42f83a14ca2..4dd283d9473 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -12930,6 +12930,10 @@ class TestOther : public TestFixture { "[test.cpp:9:20] -> [test.cpp:14:22]: (warning) Function 'func2' argument order different: declaration 'a, b, c' definition 'c, b, a' [funcArgOrderDifferent]\n" "[test.cpp:10:20] -> [test.cpp:15:22]: (warning) Function 'func3' argument order different: declaration 'a, b, c' definition 'c, b, a' [funcArgOrderDifferent]\n" "[test.cpp:11:16] -> [test.cpp:16:22]: (warning) Function 'func4' argument order different: declaration ', b, c' definition 'c, b, a' [funcArgOrderDifferent]\n", errout_str()); + + check("void f(int N, const int a[N], const int b[N]);\n" // #14710 + "void f(int N, const int a[N], const int b[N]) {}\n"); + ASSERT_EQUALS("", errout_str()); } // #7846 - Syntax error when using C++11 braced-initializer in default argument