diff options
author | Anders Carlsson <andersca@mac.com> | 2009-05-16 23:59:08 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-05-16 23:59:08 +0000 |
commit | 758a422bc1af68f64f7f86ef4aad958148a89e97 (patch) | |
tree | 9893926926b88c80bb5d7f52d7e990ed0a03b1f8 /lib/Sema/SemaDecl.cpp | |
parent | 05eb24474218d70366b4d7d6b5b19dda2473a163 (diff) |
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
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) && |