From: Ted Kremenek Date: Wed, 25 Nov 2009 21:45:48 +0000 (+0000) Subject: Register internal checks with GRExprEngine when it is constructed, not manually in... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c80135ba857da48173578b9c528fce6777e18168;p=clang Register internal checks with GRExprEngine when it is constructed, not manually in AnalysisConsumer.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89883 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp index 403126c471..bfdbbdbad2 100644 --- a/lib/Analysis/GRExprEngine.cpp +++ b/lib/Analysis/GRExprEngine.cpp @@ -216,7 +216,11 @@ GRExprEngine::GRExprEngine(AnalysisManager &mgr) CurrentStmt(NULL), NSExceptionII(NULL), NSExceptionInstanceRaiseSelectors(NULL), RaiseSel(GetNullarySelector("raise", G.getContext())), - BR(mgr, *this) {} + BR(mgr, *this) +{ + // Register internal checks. + RegisterInternalChecks(); +} GRExprEngine::~GRExprEngine() { BR.FlushReports(); diff --git a/lib/Frontend/AnalysisConsumer.cpp b/lib/Frontend/AnalysisConsumer.cpp index ede3d474c8..43e168fbd7 100644 --- a/lib/Frontend/AnalysisConsumer.cpp +++ b/lib/Frontend/AnalysisConsumer.cpp @@ -329,8 +329,6 @@ static void ActionGRExprEngine(AnalysisConsumer &C, AnalysisManager& mgr, Decl * GRExprEngine Eng(mgr); Eng.setTransferFunctions(tf); - Eng.RegisterInternalChecks(); // FIXME: Internal checks should just - // automatically register. if (C.Opts.EnableExperimentalInternalChecks) RegisterExperimentalInternalChecks(Eng);