]> granicus.if.org Git - clang/commitdiff
Add OldMD to the list of methods NewMD overrides
authorAnders Carlsson <andersca@mac.com>
Sat, 16 May 2009 23:59:08 +0000 (23:59 +0000)
committerAnders Carlsson <andersca@mac.com>
Sat, 16 May 2009 23:59:08 +0000 (23:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71969 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDecl.cpp

index c881200d07f24e14e413be8397bb0b2428319668..92344d30d3e1234c2362a23369770dc84643be85 100644 (file)
@@ -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) &&