diff options
| author | Ted Kremenek <kremenek@apple.com> | 2008-04-19 19:12:50 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2008-04-19 19:12:50 +0000 |
| commit | 575f24ef738c97946514c7ab13ea975234fc4424 (patch) | |
| tree | 5892e8cf2acae2ffff538e5b0fe64fb5439ad79e /clang/lib/Analysis | |
| parent | 31d2176d1ea3d3151c8393e4fbcaa7ef4802e2d5 (diff) | |
| download | bcm5719-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.cpp | 6 |
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(); |

