]> granicus.if.org Git - clang/commitdiff
Save and restore the HasGen flag in MallocChecker.
authorZhongxing Xu <xuzhongxing@gmail.com>
Sun, 22 Nov 2009 13:22:34 +0000 (13:22 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Sun, 22 Nov 2009 13:22:34 +0000 (13:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89590 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/PathSensitive/GRCoreEngine.h
lib/Analysis/MallocChecker.cpp

index 870de82bd85c57dc49870098f87d93546813caa2..b78cc6adfc4a8f95f355f754b78664b1e34724a5 100644 (file)
@@ -405,6 +405,8 @@ class GREndPathNodeBuilder {
   GRCoreEngine& Eng;
   CFGBlock& B;
   ExplodedNode* Pred;
+
+public:
   bool HasGeneratedNode;
 
 public:
index 93e708332ed768ef245922c8eb8cd58fcbc57d0b..995720b1f8f7815c2ee1a3250a7e5ffec3e172ac 100644 (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>();