From: Ted Kremenek Date: Sat, 19 Apr 2008 19:12:50 +0000 (+0000) Subject: Gracefully handle when the receiver of a message expression is not a pointer type. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6bdafbfec5ecc50151b1b66732b168a79cc47531;p=clang Gracefully handle when the receiver of a message expression is not a pointer type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49959 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/BasicObjCFoundationChecks.cpp b/lib/Analysis/BasicObjCFoundationChecks.cpp index 7e51aee17b..98c7e28b74 100644 --- a/lib/Analysis/BasicObjCFoundationChecks.cpp +++ b/lib/Analysis/BasicObjCFoundationChecks.cpp @@ -39,7 +39,11 @@ static ObjCInterfaceType* GetReceiverType(ObjCMessageExpr* ME) { // FIXME: Cleanup QualType X = Receiver->getType(); Type* TP = X.getTypePtr(); - assert (TP->isPointerType()); + + // FIXME: Why can this not be a pointer type? + // assert (TP->isPointerType()); + if (!TP->isPointerType()) + return NULL; const PointerType* T = TP->getAsPointerType();