From cffff840075f6d10387b965fabd2de38802fc85f Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Mon, 12 Nov 2007 20:20:37 +0000 Subject: [PATCH] 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 --- Sema/SemaExpr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.40.0