aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-10-19 02:25:16 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-10-19 02:25:16 +0000
commit7c81c2a5915878e4aa6908a097290fd47fb3a154 (patch)
treec29464eed7bb917ee51ef0e679d81c77017f62b8 /lib/Sema/SemaExpr.cpp
parent53e535161dfa9850de394b300915fc250eb0fdf4 (diff)
Don't forget to complete the objc interface before asking for information,
otherwise lldb will suffer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142471 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 47c8f540e4..3b4a40b51a 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -1934,7 +1934,8 @@ Sema::LookupInObjCMethod(LookupResult &Lookup, Scope *S,
if (LookForIvars) {
IFace = CurMethod->getClassInterface();
ObjCInterfaceDecl *ClassDeclared;
- if (ObjCIvarDecl *IV = IFace->lookupInstanceVariable(II, ClassDeclared)) {
+ ObjCIvarDecl *IV = 0;
+ if (IFace && (IV = IFace->lookupInstanceVariable(II, ClassDeclared))) {
// Diagnose using an ivar in a class method.
if (IsClassMethod)
return ExprError(Diag(Loc, diag::error_ivar_use_in_class_method)