Refactored some of the BugReporter interface so that data such as the ASTContext&, PathDiagnosticClient*, can be provided by an external source.
Split BugReporter into BugReporter and GRBugReporter so checkers not based on GRExprEngine can still use the BugReporter mechanism.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53048 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index c9ab809..0c9a1b6 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -108,21 +108,21 @@
 };
 
 
-void GRExprEngine::EmitWarnings(Diagnostic& Diag, PathDiagnosticClient* PD) {
+void GRExprEngine::EmitWarnings(BugReporterData& BRData) {
   for (bug_type_iterator I = bug_types_begin(), E = bug_types_end(); I!=E; ++I){
-    BugReporter BR(Diag, PD, getContext(), *this);
+    GRBugReporter BR(BRData, *this);
     (*I)->EmitWarnings(BR);
   }
   
   for (SimpleChecksTy::iterator I = CallChecks.begin(), E = CallChecks.end();
        I != E; ++I) {
-    BugReporter BR(Diag, PD, getContext(), *this);
+    GRBugReporter BR(BRData, *this);
     (*I)->EmitWarnings(BR);
   }
   
   for (SimpleChecksTy::iterator I=MsgExprChecks.begin(), E=MsgExprChecks.end();
        I != E; ++I) {
-    BugReporter BR(Diag, PD, getContext(), *this);
+    GRBugReporter BR(BRData, *this);
     (*I)->EmitWarnings(BR);
   }
 }