From 74088f0ea1ed1e6a63db5581efb607d3d1f528b2 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Thu, 11 Apr 2024 14:37:07 +0200 Subject: [PATCH] Update checkclass.cpp --- lib/checkclass.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index 1a42f8ab820..cbf21898579 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -3327,6 +3327,8 @@ void CheckClass::checkReturnByReference() for (const Function& func : classScope->functionList) { if (Function::returnsPointer(&func) || Function::returnsReference(&func) || Function::returnsStandardType(&func)) continue; + if (func.isImplicitlyVirtual()) + continue; if (const Variable* var = getSingleReturnVar(func.functionScope)) { if (!var->valueType()) continue;