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 7e51aee..98c7e28 100644
--- a/lib/Analysis/BasicObjCFoundationChecks.cpp
+++ b/lib/Analysis/BasicObjCFoundationChecks.cpp
@@ -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();