]> granicus.if.org Git - clang/commitdiff
Since the object is new'ed in the enterCFG function, now deleting in the exitCFG...
authorAaron Ballman <aaron@aaronballman.com>
Thu, 17 Apr 2014 15:23:50 +0000 (15:23 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Thu, 17 Apr 2014 15:23:50 +0000 (15:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206471 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/Analyses/ThreadSafetyCommon.h
lib/Analysis/ThreadSafetyCommon.cpp

index 994af713f61ac4ff21cd78ab6b7cecfc93f8b16b..cff0781666df138f0be6113fbf3313e1ca3f972b 100644 (file)
@@ -227,10 +227,6 @@ public:
     SelfVar = new (Arena)til::Variable(til::Variable::VK_SFun);
   }
 
-  ~SExprBuilder() {
-    delete CallCtx;
-  }
-
   // Translate a clang statement or expression to a TIL expression.
   // Also performs substitution of variables; Ctx provides the context.
   // Dispatches on the type of S.
index 2c90b2a4be7411b2261e19afcebd3b51e5596432..02c9e8dc036a3c76d569f5ba0dc4df968d607c9c 100644 (file)
@@ -597,6 +597,7 @@ void SExprBuilder::exitCFG(const CFGBlock *Last) {
   CurrentBlockID = 0;
   CurrentVarID = 0;
   CurrentArgIndex = 0;
+  delete CallCtx;
 }