[cfe-commits] r89590 - in /cfe/trunk: include/clang/Analysis/PathSensitive/GRCoreEngine.h lib/Analysis/MallocChecker.cpp

Zhongxing Xu xuzhongxing at gmail.com
Sun Nov 22 05:22:35 PST 2009


Author: zhongxingxu
Date: Sun Nov 22 07:22:34 2009
New Revision: 89590

URL: http://llvm.org/viewvc/llvm-project?rev=89590&view=rev
Log:
Save and restore the HasGen flag in MallocChecker.

Modified:
    cfe/trunk/include/clang/Analysis/PathSensitive/GRCoreEngine.h
    cfe/trunk/lib/Analysis/MallocChecker.cpp

Modified: cfe/trunk/include/clang/Analysis/PathSensitive/GRCoreEngine.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/GRCoreEngine.h?rev=89590&r1=89589&r2=89590&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/GRCoreEngine.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/GRCoreEngine.h Sun Nov 22 07:22:34 2009
@@ -405,6 +405,8 @@
   GRCoreEngine& Eng;
   CFGBlock& B;
   ExplodedNode* Pred;
+
+public:
   bool HasGeneratedNode;
 
 public:

Modified: cfe/trunk/lib/Analysis/MallocChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/MallocChecker.cpp?rev=89590&r1=89589&r2=89590&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/MallocChecker.cpp (original)
+++ cfe/trunk/lib/Analysis/MallocChecker.cpp Sun Nov 22 07:22:34 2009
@@ -173,6 +173,7 @@
 
 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>();





More information about the cfe-commits mailing list