summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaLookup.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-01-11 22:40:45 +0000
committerDouglas Gregor <dgregor@apple.com>2010-01-11 22:40:45 +0000
commit88f3eb898a0ace0ff161c52508bd33ffdfc75bf5 (patch)
tree4376c8ca70db8216a4f638db80f670cade46b2f8 /clang/lib/Sema/SemaLookup.cpp
parent394bf0d0ba9f5b89ce5fdfa1f024e92a2deada22 (diff)
downloadbcm5719-llvm-88f3eb898a0ace0ff161c52508bd33ffdfc75bf5.tar.gz
bcm5719-llvm-88f3eb898a0ace0ff161c52508bd33ffdfc75bf5.zip
When performing name lookup into a scope, check that its entity is
non-NULL before looking at the entity itself. llvm-svn: 93199
Diffstat (limited to 'clang/lib/Sema/SemaLookup.cpp')
-rw-r--r--clang/lib/Sema/SemaLookup.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index a8c2366c59b..bff7881eb6b 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/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() &&
OpenPOWER on IntegriCloud