summaryrefslogtreecommitdiffstats
path: root/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
commit7432b90e88ac9e219f6e8a3151c097b0b7da933c (patch)
treea642ab08704a631f9613109d0002825d1309f089 /lib/Sema/SemaAccess.cpp
parentc71d55469e7d5f7b376a30620617a175a9442da9 (diff)
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>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144582 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaAccess.cpp')
-rw-r--r--lib/Sema/SemaAccess.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaAccess.cpp b/lib/Sema/SemaAccess.cpp
index 69fd543082..9bb8f616b6 100644
--- a/lib/Sema/SemaAccess.cpp
+++ b/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) {