diff options
| author | Jordy Rose <jediknil@belkadan.com> | 2011-09-02 06:29:27 +0000 |
|---|---|---|
| committer | Jordy Rose <jediknil@belkadan.com> | 2011-09-02 06:29:27 +0000 |
| commit | dd7a654b1a50e99042c399862eba1e07452156b7 (patch) | |
| tree | 58998d6cf34607a34f6f58ffa878fdabc9a22323 /clang | |
| parent | a87a2775fa908652a26aacf52158dd148ea4a1df (diff) | |
| download | bcm5719-llvm-dd7a654b1a50e99042c399862eba1e07452156b7.tar.gz bcm5719-llvm-dd7a654b1a50e99042c399862eba1e07452156b7.zip | |
[analyzer] Remove lingering CFRefCount creation, which would have resulted in a leak. There's room for improvement here...
llvm-svn: 139000
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Core/CoreEngine.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp b/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp index f71802fd430..06c3af1c0ae 100644 --- a/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp +++ b/clang/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(), |

