diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2007-11-12 20:20:37 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2007-11-12 20:20:37 +0000 |
commit | cffff840075f6d10387b965fabd2de38802fc85f (patch) | |
tree | ae6eefd17eb7dab91efe68511cb0fcf34701f8ca | |
parent | 0523aaf9759cd9524956f0930558737458849743 (diff) |
Minor twik for when there is no super class and 'super' is errornously used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44026 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Sema/SemaExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Sema/SemaExpr.cpp b/Sema/SemaExpr.cpp index 643f586fd5..d51a29631b 100644 --- a/Sema/SemaExpr.cpp +++ b/Sema/SemaExpr.cpp @@ -2070,7 +2070,7 @@ Sema::ExprResult Sema::ActOnClassMessage( ObjcInterfaceDecl* ClassDecl = 0; if (!strcmp(receiverName->getName(), "super") && CurMethodDecl) { ClassDecl = CurMethodDecl->getClassInterface()->getSuperClass(); - if (CurMethodDecl->isInstance()) { + if (ClassDecl && CurMethodDecl->isInstance()) { IdentifierInfo &II = Context.Idents.get("self"); ExprResult ReceiverExpr = ActOnIdentifierExpr(S, lbrac, II, false); |