diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-19 02:25:16 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-19 02:25:16 +0000 |
commit | 4e8b13613bd1573ad02585378227e7ef0e65c50c (patch) | |
tree | ee945fc7999aa0759d649b74ac2377c1a11955bf /clang/lib/Sema | |
parent | a737ba55af89e752ab95300309d8c4df2cf6de15 (diff) | |
download | bcm5719-llvm-4e8b13613bd1573ad02585378227e7ef0e65c50c.tar.gz bcm5719-llvm-4e8b13613bd1573ad02585378227e7ef0e65c50c.zip |
Don't forget to complete the objc interface before asking for information,
otherwise lldb will suffer.
llvm-svn: 142471
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 47c8f540e47..3b4a40b51ab 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/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) |