From 24eadefee06fcf5edca826c4695607c58a396d68 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Wed, 11 Mar 2026 12:52:58 +0100 Subject: [PATCH 1/2] Update testclass.cpp --- test/testclass.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/testclass.cpp b/test/testclass.cpp index 9698916c41a..96b348fd376 100644 --- a/test/testclass.cpp +++ b/test/testclass.cpp @@ -734,6 +734,13 @@ class TestClass : public TestFixture { " void Two() = delete;\n" "};\n"); ASSERT_EQUALS("", errout_str()); + + checkDuplInheritedMembers("struct B { void f(); };\n" // #14583 + "struct D : B {\n" + " template \n" + " void f();\n" + "};\n"); + ASSERT_EQUALS("", errout_str()); } #define checkCopyConstructor(...) checkCopyConstructor_( __FILE__, __LINE__, __VA_ARGS__) From 261d5a3206c7c7722792246a42038a349a50c861 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Wed, 11 Mar 2026 12:53:38 +0100 Subject: [PATCH 2/2] Update checkclass.cpp --- lib/checkclass.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index 2b972e221fc..8f3c3baa293 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -3127,6 +3127,8 @@ static std::vector getDuplInheritedMemberFunctionsRecursive( continue; if (classFuncIt.tokenDef->isExpandedMacro()) continue; + if (classFuncIt.templateDef) + continue; for (const Function& parentClassFuncIt : parentClassIt.type->classScope->functionList) { if (classFuncIt.name() == parentClassFuncIt.name() && (parentClassFuncIt.access != AccessControl::Private || !skipPrivate) &&