diff options
| author | Douglas Gregor <dgregor@apple.com> | 2011-11-14 23:00:43 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2011-11-14 23:00:43 +0000 |
| commit | 0201a4c2d361efa54155c482d250bdc869bd472f (patch) | |
| tree | 08b9cd757c662d30a61f8b5e7ad8641129de7e75 /clang/lib/Sema/SemaAccess.cpp | |
| parent | 02947e04f6b4c32ce8456a724cbfd564d0f4e866 (diff) | |
| download | bcm5719-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.cpp | 3 |
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) { |

