From: Anders Carlsson Date: Sat, 16 May 2009 23:59:08 +0000 (+0000) Subject: Add OldMD to the list of methods NewMD overrides X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=758a422bc1af68f64f7f86ef4aad958148a89e97;p=clang 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 --- 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) &&