aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/CoreEngine.cpp
diff options
context:
space:
mode:
authorJordy Rose <jediknil@belkadan.com>2011-09-02 06:29:27 +0000
committerJordy Rose <jediknil@belkadan.com>2011-09-02 06:29:27 +0000
commit46331ef4301d8e295776649bcccd8c4bb4de81da (patch)
treebc0276d5d3085c085be9bfb9504f8612c19adaa6 /lib/StaticAnalyzer/Core/CoreEngine.cpp
parente1b364324b94e54c610a1681ab96df755ba766fd (diff)
[analyzer] Remove lingering CFRefCount creation, which would have resulted in a leak. There's room for improvement here...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139000 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/CoreEngine.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/CoreEngine.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/StaticAnalyzer/Core/CoreEngine.cpp b/lib/StaticAnalyzer/Core/CoreEngine.cpp
index f71802fd43..06c3af1c0a 100644
--- a/lib/StaticAnalyzer/Core/CoreEngine.cpp
+++ b/lib/StaticAnalyzer/Core/CoreEngine.cpp
@@ -22,14 +22,6 @@
using namespace clang;
using namespace ento;
-// This should be removed in the future.
-namespace clang {
-namespace ento {
-TransferFuncs* MakeCFRefCountTF(ASTContext &Ctx, bool GCEnabled,
- const LangOptions& lopts);
-}
-}
-
//===----------------------------------------------------------------------===//
// Worklist classes for exploration of reachable states.
//===----------------------------------------------------------------------===//
@@ -813,11 +805,10 @@ void CallEnterNodeBuilder::generateNode(const ProgramState *state) {
OldMgr.getAnalysisContextManager().
getCFGBuildOptions().AddInitializers,
OldMgr.shouldEagerlyTrimExplodedGraph());
- llvm::OwningPtr<TransferFuncs> TF(MakeCFRefCountTF(AMgr.getASTContext(),
- /* GCEnabled */ false,
- AMgr.getLangOptions()));
// Create the new engine.
- ExprEngine NewEng(AMgr, TF.take());
+ // FIXME: This cast isn't really safe.
+ bool GCEnabled = static_cast<ExprEngine&>(Eng.SubEng).isObjCGCEnabled();
+ ExprEngine NewEng(AMgr, GCEnabled);
// Create the new LocationContext.
AnalysisContext *NewAnaCtx = AMgr.getAnalysisContext(CalleeCtx->getDecl(),