From 758a422bc1af68f64f7f86ef4aad958148a89e97 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sat, 16 May 2009 23:59:08 +0000 Subject: [PATCH] Add OldMD to the list of methods NewMD overrides git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71969 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaDecl.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index c881200d07..92344d30d3 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -2161,15 +2161,11 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC, if (!OldMD->isVirtual()) continue; - if (!CheckOverridingFunctionReturnType(NewMD, OldMD)) { - // FIXME: Add OldMD to the list of methods NewMD overrides. - } - + if (!CheckOverridingFunctionReturnType(NewMD, OldMD)) + NewMD->addOverriddenMethod(OldMD); } } - } - } if (SC == FunctionDecl::Static && isa(NewFD) && -- 2.40.0