[cfe-commits] r49959 - /cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp

Ted Kremenek kremenek at apple.com
Sat Apr 19 12:12:51 PDT 2008


Author: kremenek
Date: Sat Apr 19 14:12:50 2008
New Revision: 49959

URL: http://llvm.org/viewvc/llvm-project?rev=49959&view=rev
Log:
Gracefully handle when the receiver of a message expression is not a pointer type.

Modified:
    cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp

Modified: cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp?rev=49959&r1=49958&r2=49959&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp (original)
+++ cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp Sat Apr 19 14:12:50 2008
@@ -39,7 +39,11 @@
   // 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();
   





More information about the cfe-commits mailing list