[llvm-branch-commits] [cfe-tag] r95418 - /cfe/tags/cremebrulee/cremebrulee-36.2/lib/Sema/SemaLookup.cpp
Ted Kremenek
kremenek at apple.com
Fri Feb 5 11:49:28 PST 2010
Author: kremenek
Date: Fri Feb 5 13:49:27 2010
New Revision: 95418
URL: http://llvm.org/viewvc/llvm-project?rev=95418&view=rev
Log:
Merge in r95334.
Modified:
cfe/tags/cremebrulee/cremebrulee-36.2/lib/Sema/SemaLookup.cpp
Modified: cfe/tags/cremebrulee/cremebrulee-36.2/lib/Sema/SemaLookup.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/tags/cremebrulee/cremebrulee-36.2/lib/Sema/SemaLookup.cpp?rev=95418&r1=95417&r2=95418&view=diff
==============================================================================
--- cfe/tags/cremebrulee/cremebrulee-36.2/lib/Sema/SemaLookup.cpp (original)
+++ cfe/tags/cremebrulee/cremebrulee-36.2/lib/Sema/SemaLookup.cpp Fri Feb 5 13:49:27 2010
@@ -1985,6 +1985,9 @@
bool InBaseClass,
VisibleDeclConsumer &Consumer,
VisibleDeclsRecord &Visited) {
+ if (!Ctx)
+ return;
+
// Make sure we don't visit the same context twice.
if (Visited.visitedContext(Ctx->getPrimaryContext()))
return;
@@ -2138,9 +2141,9 @@
// For instance methods, look for ivars in the method's interface.
LookupResult IvarResult(Result.getSema(), Result.getLookupName(),
Result.getNameLoc(), Sema::LookupMemberName);
- ObjCInterfaceDecl *IFace = Method->getClassInterface();
- LookupVisibleDecls(IFace, IvarResult, /*QualifiedNameLookup=*/false,
- /*InBaseClass=*/false, Consumer, Visited);
+ if (ObjCInterfaceDecl *IFace = Method->getClassInterface())
+ LookupVisibleDecls(IFace, IvarResult, /*QualifiedNameLookup=*/false,
+ /*InBaseClass=*/false, Consumer, Visited);
}
// We've already performed all of the name lookup that we need
More information about the llvm-branch-commits
mailing list