Save and restore the HasGen flag in MallocChecker.

llvm-svn: 89590
This commit is contained in:
Zhongxing Xu 2009-11-22 13:22:34 +00:00
parent 2e245f4e18
commit 7f83e97b00
2 changed files with 3 additions and 0 deletions

View File

@ -405,6 +405,8 @@ class GREndPathNodeBuilder {
GRCoreEngine& Eng;
CFGBlock& B;
ExplodedNode* Pred;
public:
bool HasGeneratedNode;
public:

View File

@ -173,6 +173,7 @@ void MallocChecker::EvalDeadSymbols(CheckerContext &C, const Stmt *S,
void MallocChecker::EvalEndPath(GREndPathNodeBuilder &B, void *tag,
GRExprEngine &Eng) {
SaveAndRestore<bool> OldHasGen(B.HasGeneratedNode);
const GRState *state = B.getState();
typedef llvm::ImmutableMap<SymbolRef, RefState> SymMap;
SymMap M = state->get<RegionState>();