Make the LookupBase boolean an enum instead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72594 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaInherit.cpp b/lib/Sema/SemaInherit.cpp
index f5c7a7f..5eef1eb 100644
--- a/lib/Sema/SemaInherit.cpp
+++ b/lib/Sema/SemaInherit.cpp
@@ -175,10 +175,12 @@
// type to see if we've found a member that meets the search
// criteria.
bool FoundPathToThisBase = false;
- if (Criteria.LookupBase) {
+ switch (Criteria.Kind) {
+ case MemberLookupCriteria::LK_Base:
FoundPathToThisBase
= (Context.getCanonicalType(BaseSpec->getType()) == Criteria.Base);
- } else {
+ break;
+ case MemberLookupCriteria::LK_NamedMember:
Paths.ScratchPath.Decls = BaseRecord->lookup(Context, Criteria.Name);
while (Paths.ScratchPath.Decls.first != Paths.ScratchPath.Decls.second) {
if (isAcceptableLookupResult(*Paths.ScratchPath.Decls.first,
@@ -188,6 +190,7 @@
}
++Paths.ScratchPath.Decls.first;
}
+ break;
}
if (FoundPathToThisBase) {