diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-30 22:48:21 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-30 22:48:21 +0000 |
commit | c1ff3cd5fe4436bb14309fdc5ee7e1c2b702b7c3 (patch) | |
tree | b15616db55ddac183839c16c4f06442ba4dea8ad /lib/Analysis/BasicObjCFoundationChecks.cpp | |
parent | ee90dba3529dba5086918d6419fb7ce0d687bc05 (diff) |
More cleanups with ObjCQualifiedIdType in the static analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50503 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BasicObjCFoundationChecks.cpp')
-rw-r--r-- | lib/Analysis/BasicObjCFoundationChecks.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Analysis/BasicObjCFoundationChecks.cpp b/lib/Analysis/BasicObjCFoundationChecks.cpp index d2a3d08b8e..bb16df91c6 100644 --- a/lib/Analysis/BasicObjCFoundationChecks.cpp +++ b/lib/Analysis/BasicObjCFoundationChecks.cpp @@ -16,7 +16,6 @@ #include "BasicObjCFoundationChecks.h" #include "clang/Analysis/PathSensitive/ExplodedGraph.h" -#include "clang/Analysis/PathSensitive/GRExprEngine.h" #include "clang/Analysis/PathSensitive/GRSimpleAPICheck.h" #include "clang/Analysis/PathSensitive/ValueState.h" #include "clang/Analysis/PathSensitive/BugReporter.h" @@ -36,15 +35,16 @@ static ObjCInterfaceType* GetReceiverType(ObjCMessageExpr* ME) { if (!Receiver) return NULL; - // FIXME: Cleanup QualType X = Receiver->getType(); - Type* TP = X.getTypePtr(); - assert (IsPointerType(X)); - - const PointerType* T = TP->getAsPointerType(); - - return dyn_cast<ObjCInterfaceType>(T->getPointeeType().getTypePtr()); + if (X->isPointerType()) { + Type* TP = X.getTypePtr(); + const PointerType* T = TP->getAsPointerType(); + return dyn_cast<ObjCInterfaceType>(T->getPointeeType().getTypePtr()); + } + + // FIXME: Support ObjCQualifiedIdType? + return NULL; } static const char* GetReceiverNameType(ObjCMessageExpr* ME) { |