retain/release checker: More cleanups (no real functionality change).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63181 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ted Kremenek 2009-01-28 05:29:13 +00:00
Родитель 103a185af4
Коммит 611a15a18f
1 изменённых файлов: 10 добавлений и 15 удалений

Просмотреть файл

@ -2310,20 +2310,15 @@ PathDiagnosticPiece* CFRefReport::VisitNode(const ExplodedNode<GRState>* N,
BugReporter& BR) {
// Check if the type state has changed.
GRStateManager &StMgr = cast<GRBugReporter>(BR).getStateManager();
GRStateRef PrevSt(PrevN->getState(), StMgr);
GRStateRef CurrSt(N->getState(), StMgr);
const GRState* PrevSt = PrevN->getState();
GRStateRef CurrSt(N->getState(), cast<GRBugReporter>(BR).getStateManager());
const RefVal* CurrT = CurrSt.get<RefBindings>(Sym);
if (!CurrT) return NULL;
RefBindings PrevB = PrevSt->get<RefBindings>();
RefBindings CurrB = CurrSt.get<RefBindings>();
const RefVal* PrevT = PrevB.lookup(Sym);
const RefVal* CurrT = CurrB.lookup(Sym);
if (!CurrT)
return NULL;
const RefVal& CurrV = *CurrB.lookup(Sym);
const RefVal& CurrV = *CurrT;
const RefVal* PrevT = PrevSt.get<RefBindings>(Sym);
if (!PrevT) {
std::string sbuf;
@ -2363,7 +2358,7 @@ PathDiagnosticPiece* CFRefReport::VisitNode(const ExplodedNode<GRState>* N,
}
// Determine if the typestate has changed.
RefVal PrevV = *PrevB.lookup(Sym);
RefVal PrevV = *PrevT;
if (PrevV == CurrV)
return NULL;