]> granicus.if.org Git - clang/commitdiff
Minor twik for when there is no super class and 'super' is errornously used.
authorFariborz Jahanian <fjahanian@apple.com>
Mon, 12 Nov 2007 20:20:37 +0000 (20:20 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Mon, 12 Nov 2007 20:20:37 +0000 (20:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44026 91177308-0d34-0410-b5e6-96231b3b80d8

Sema/SemaExpr.cpp

index 643f586fd51f0236f1966f1bd92bdafd67eab6b3..d51a29631bf92619d8670859aa6353e14ac565b3 100644 (file)
@@ -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);