More cleanups with ObjCQualifiedIdType in the static analyzer.

llvm-svn: 50503
This commit is contained in:
Ted Kremenek 2008-04-30 22:48:21 +00:00
parent a16dacb6aa
commit f20e2285c9
2 changed files with 10 additions and 9 deletions

View File

@ -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) {

View File

@ -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));
}