summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaInherit.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-05-29 23:42:05 +0000
committerAnders Carlsson <andersca@mac.com>2009-05-29 23:42:05 +0000
commit01bcef4a17131b08fd6cf8f7bdaa4b8456dd63f8 (patch)
tree963a3c90aea0a435d0cd5a4f92ec9bd03459366e /clang/lib/Sema/SemaInherit.cpp
parentb6f4538683a5075b7b345746ab4cc81f487c9507 (diff)
downloadbcm5719-llvm-01bcef4a17131b08fd6cf8f7bdaa4b8456dd63f8.tar.gz
bcm5719-llvm-01bcef4a17131b08fd6cf8f7bdaa4b8456dd63f8.zip
Make the LookupBase boolean an enum instead.
llvm-svn: 72594
Diffstat (limited to 'clang/lib/Sema/SemaInherit.cpp')
-rw-r--r--clang/lib/Sema/SemaInherit.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaInherit.cpp b/clang/lib/Sema/SemaInherit.cpp
index f5c7a7f2d0e..5eef1eb4c07 100644
--- a/clang/lib/Sema/SemaInherit.cpp
+++ b/clang/lib/Sema/SemaInherit.cpp
@@ -175,10 +175,12 @@ bool Sema::LookupInBases(CXXRecordDecl *Class,
// 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 @@ bool Sema::LookupInBases(CXXRecordDecl *Class,
}
++Paths.ScratchPath.Decls.first;
}
+ break;
}
if (FoundPathToThisBase) {
OpenPOWER on IntegriCloud