diff options
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 8 |
1 files 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<CXXMethodDecl>(NewFD) && |