summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis
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
commit575f24ef738c97946514c7ab13ea975234fc4424 (patch)
tree5892e8cf2acae2ffff538e5b0fe64fb5439ad79e /clang/lib/Analysis
parent31d2176d1ea3d3151c8393e4fbcaa7ef4802e2d5 (diff)
downloadbcm5719-llvm-575f24ef738c97946514c7ab13ea975234fc4424.tar.gz
bcm5719-llvm-575f24ef738c97946514c7ab13ea975234fc4424.zip
Gracefully handle when the receiver of a message expression is not a pointer type.
llvm-svn: 49959
Diffstat (limited to 'clang/lib/Analysis')
-rw-r--r--clang/lib/Analysis/BasicObjCFoundationChecks.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Analysis/BasicObjCFoundationChecks.cpp b/clang/lib/Analysis/BasicObjCFoundationChecks.cpp
index 7e51aee17b7..98c7e28b740 100644
--- a/clang/lib/Analysis/BasicObjCFoundationChecks.cpp
+++ b/clang/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();
OpenPOWER on IntegriCloud