Fixed elusive caching bug that led to false positives.

llvm-svn: 49914
This commit is contained in:
Ted Kremenek 2008-04-18 19:34:16 +00:00
parent d556115e7e
commit acefba896c
2 changed files with 6 additions and 1 deletions

View File

@ -164,6 +164,8 @@ public:
Stmt* getStmt() const { return B[Idx]; }
CFGBlock* getBlock() const { return &B; }
bool hasGeneratedNode() const { return HasGeneratedNode; }
};
@ -186,6 +188,8 @@ public:
CleanedState = getLastNode()->getState();
}
bool hasGeneratedNode() const { return NB.hasGeneratedNode(); }
void setObjCMsgExprAuditors(GRAuditor<StateTy> **B,
GRAuditor<StateTy> **E) {
ObjCMsgExprAuditBeg = B;

View File

@ -187,7 +187,8 @@ void GRExprEngine::ProcessStmt(Stmt* S, StmtNodeBuilder& builder) {
// If no nodes were generated, generate a new node that has all the
// dead mappings removed.
if (Dst.size() == 1 && *Dst.begin() == StmtEntryNode)
if (Dst.size() == 1 && *Dst.begin() == StmtEntryNode &&
!Builder->hasGeneratedNode())
builder.generateNode(S, GetState(StmtEntryNode), StmtEntryNode);
// NULL out these variables to cleanup.