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 c881200..92344d3 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -2161,15 +2161,11 @@
           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) &&