]> granicus.if.org Git - clang/commitdiff
Gracefully handle when the receiver of a message expression is not a pointer type.
authorTed Kremenek <kremenek@apple.com>
Sat, 19 Apr 2008 19:12:50 +0000 (19:12 +0000)
committerTed Kremenek <kremenek@apple.com>
Sat, 19 Apr 2008 19:12:50 +0000 (19:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49959 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/BasicObjCFoundationChecks.cpp

index 7e51aee17b7a9ae2d651723056eaaceeeaa5355a..98c7e28b740f0e3c28f7ef196761bc9b326c11ca 100644 (file)
@@ -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();