summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaAccess.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-11-14 23:00:43 +0000
committerDouglas Gregor <dgregor@apple.com>2011-11-14 23:00:43 +0000
commit0201a4c2d361efa54155c482d250bdc869bd472f (patch)
tree08b9cd757c662d30a61f8b5e7ad8641129de7e75 /clang/lib/Sema/SemaAccess.cpp
parent02947e04f6b4c32ce8456a724cbfd564d0f4e866 (diff)
downloadbcm5719-llvm-0201a4c2d361efa54155c482d250bdc869bd472f.tar.gz
bcm5719-llvm-0201a4c2d361efa54155c482d250bdc869bd472f.zip
When we're checking access in a dependent context, don't try to look
at the bases of an undefined class. Fixes <rdar://problem/10438657>. llvm-svn: 144582
Diffstat (limited to 'clang/lib/Sema/SemaAccess.cpp')
-rw-r--r--clang/lib/Sema/SemaAccess.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaAccess.cpp b/clang/lib/Sema/SemaAccess.cpp
index 69fd543082c..9bb8f616b64 100644
--- a/clang/lib/Sema/SemaAccess.cpp
+++ b/clang/lib/Sema/SemaAccess.cpp
@@ -265,6 +265,9 @@ static AccessResult IsDerivedFromInclusive(const CXXRecordDecl *Derived,
SmallVector<const CXXRecordDecl*, 8> Queue; // actually a stack
while (true) {
+ if (Derived->isDependentContext() && !Derived->hasDefinition())
+ return AR_dependent;
+
for (CXXRecordDecl::base_class_const_iterator
I = Derived->bases_begin(), E = Derived->bases_end(); I != E; ++I) {
OpenPOWER on IntegriCloud