summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaInherit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaInherit.cpp')
-rw-r--r--clang/lib/Sema/SemaInherit.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaInherit.cpp b/clang/lib/Sema/SemaInherit.cpp
index 5eef1eb4c07..1eccc1f193f 100644
--- a/clang/lib/Sema/SemaInherit.cpp
+++ b/clang/lib/Sema/SemaInherit.cpp
@@ -191,6 +191,22 @@ bool Sema::LookupInBases(CXXRecordDecl *Class,
++Paths.ScratchPath.Decls.first;
}
break;
+ case MemberLookupCriteria::LK_OverriddenMember:
+ Paths.ScratchPath.Decls =
+ BaseRecord->lookup(Context, Criteria.Method->getDeclName());
+ while (Paths.ScratchPath.Decls.first != Paths.ScratchPath.Decls.second) {
+ CXXMethodDecl *MD =
+ cast<CXXMethodDecl>(*Paths.ScratchPath.Decls.first);
+
+ OverloadedFunctionDecl::function_iterator MatchedDecl;
+ if (MD->isVirtual() && !IsOverload(Criteria.Method, MD, MatchedDecl)) {
+ FoundPathToThisBase = true;
+ break;
+ }
+
+ ++Paths.ScratchPath.Decls.first;
+ }
+ break;
}
if (FoundPathToThisBase) {
OpenPOWER on IntegriCloud