diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-01-11 22:40:45 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-01-11 22:40:45 +0000 |
commit | 277d280c20d4414d61e307789949bef8ee3063fd (patch) | |
tree | 2e55d75b9e7c2e4d84f44a42435b46f7e76f13a2 /lib/Sema/SemaLookup.cpp | |
parent | 004f81f8d1ec38047dba4d198311d31ccc8dd94d (diff) |
When performing name lookup into a scope, check that its entity is
non-NULL before looking at the entity itself.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93199 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r-- | lib/Sema/SemaLookup.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp index a8c2366c59..bff7881eb6 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -648,7 +648,7 @@ bool Sema::CppLookupName(LookupResult &R, Scope *S) { for (; S; S = S->getParent()) { DeclContext *Ctx = static_cast<DeclContext *>(S->getEntity()); - if (Ctx->isTransparentContext()) + if (!Ctx || Ctx->isTransparentContext()) continue; assert(Ctx && Ctx->isFileContext() && |