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 | f20e2285c974a2e490b136cf884552ee3278f0f3 (patch) | |
| tree | cc9fc6466f301ead9a3798e712ad9f1ac3c6be3d /clang | |
| parent | a16dacb6aabe345dba0a1ea1561db9eb4181aff3 (diff) | |
| download | bcm5719-llvm-f20e2285c974a2e490b136cf884552ee3278f0f3.tar.gz bcm5719-llvm-f20e2285c974a2e490b136cf884552ee3278f0f3.zip | |
More cleanups with ObjCQualifiedIdType in the static analyzer.
llvm-svn: 50503
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/Analysis/BasicObjCFoundationChecks.cpp | 16 | ||||
| -rw-r--r-- | clang/lib/Analysis/RValues.cpp | 3 |
2 files changed, 10 insertions, 9 deletions
diff --git a/clang/lib/Analysis/BasicObjCFoundationChecks.cpp b/clang/lib/Analysis/BasicObjCFoundationChecks.cpp index d2a3d08b8e3..bb16df91c6a 100644 --- a/clang/lib/Analysis/BasicObjCFoundationChecks.cpp +++ b/clang/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) { diff --git a/clang/lib/Analysis/RValues.cpp b/clang/lib/Analysis/RValues.cpp index 85c3b23efd0..60c349420a3 100644 --- a/clang/lib/Analysis/RValues.cpp +++ b/clang/lib/Analysis/RValues.cpp @@ -235,8 +235,9 @@ RVal RVal::GetSymbolValue(SymbolManager& SymMgr, VarDecl* D) { QualType T = D->getType(); - if (T->isPointerLikeType()) + if (T->isPointerLikeType() || T->isObjCQualifiedIdType()) return lval::SymbolVal(SymMgr.getSymbol(D)); + return nonlval::SymbolVal(SymMgr.getSymbol(D)); } |

