]> granicus.if.org Git - clang/commitdiff
Change GRTransferFuncs::RegisterChecks() to take a GRExprEngine& instead of a BugRepo...
authorTed Kremenek <kremenek@apple.com>
Tue, 3 Nov 2009 23:30:34 +0000 (23:30 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 3 Nov 2009 23:30:34 +0000 (23:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85971 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/PathSensitive/GRTransferFuncs.h
lib/Analysis/CFRefCount.cpp
lib/Analysis/GRExprEngine.cpp

index 5f7b2cb0e327e5f6346316799a9875750458f666..40c1ed3224f44a3caf3a2a8ee76f84e018b8aaf9 100644 (file)
@@ -23,7 +23,6 @@
 namespace clang {
 
 class GRExprEngine;
-class BugReporter;
 class ObjCMessageExpr;
 class GRStmtNodeBuilderRef;
 
@@ -33,7 +32,7 @@ public:
   virtual ~GRTransferFuncs() {}
 
   virtual void RegisterPrinters(std::vector<GRState::Printer*>& Printers) {}
-  virtual void RegisterChecks(BugReporter& BR) {}
+  virtual void RegisterChecks(GRExprEngine& Eng) {}
 
 
   // Calls.
@@ -78,7 +77,7 @@ public:
   virtual const GRState* EvalAssume(const GRState *state,
                                     SVal Cond, bool Assumption) {
     return state;
-  }
+  }  
 };
 
 GRTransferFuncs *CreateCallInliner(ASTContext &ctx);
index 574a61847041076bded6f238d387c69bebc0a05b..03614e83398f89fdfeb7235d1e9257eb7fe4109a 100644 (file)
@@ -1899,7 +1899,7 @@ public:
 
   virtual ~CFRefCount() {}
 
-  void RegisterChecks(BugReporter &BR);
+  void RegisterChecks(GRExprEngine &Eng);
 
   virtual void RegisterPrinters(std::vector<GRState::Printer*>& Printers) {
     Printers.push_back(new BindingsPrinter());
@@ -2193,7 +2193,9 @@ namespace {
   };
 } // end anonymous namespace
 
-void CFRefCount::RegisterChecks(BugReporter& BR) {
+void CFRefCount::RegisterChecks(GRExprEngine& Eng) {
+  BugReporter &BR = Eng.getBugReporter();
+  
   useAfterRelease = new UseAfterRelease(this);
   BR.Register(useAfterRelease);
 
index eb8c39c306647eddca1c75b0e9a1aa7d3bbb4a30..4c538c8dc8af9a38736c9ca3f608b61e11d6bb73 100644 (file)
@@ -178,7 +178,7 @@ GRExprEngine::~GRExprEngine() {
 
 void GRExprEngine::setTransferFunctions(GRTransferFuncs* tf) {
   StateMgr.TF = tf;
-  tf->RegisterChecks(getBugReporter());
+  tf->RegisterChecks(*this);
   tf->RegisterPrinters(getStateManager().Printers);
 }