aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/BasicObjCFoundationChecks.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-04-19 19:12:50 +0000
committerTed Kremenek <kremenek@apple.com>2008-04-19 19:12:50 +0000
commit6bdafbfec5ecc50151b1b66732b168a79cc47531 (patch)
tree46d78f0c1d1c931b171c46e155785d5351509481 /lib/Analysis/BasicObjCFoundationChecks.cpp
parent39a79734e7a4930290aaa8c37a0f6b55fad5698a (diff)
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
Diffstat (limited to 'lib/Analysis/BasicObjCFoundationChecks.cpp')
-rw-r--r--lib/Analysis/BasicObjCFoundationChecks.cpp6
1 files changed, 5 insertions, 1 deletions
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();