Remove CodeDecl and CFG from GRExprEngine and GRStateManager.
Now AnalysisManager is the only place we can get CodeDecl.
This leads to an API change: GRState::bindExpr() now takes the CFG argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79980 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp
index bda31fa..feffd45 100644
--- a/lib/Analysis/BugReporter.cpp
+++ b/lib/Analysis/BugReporter.cpp
@@ -36,6 +36,14 @@
     if ((*I)->isOwnedByReporterContext()) delete *I;
 }
 
+const Decl& BugReporterContext::getCodeDecl() {
+  return *BR.getEngine().getAnalysisManager().getCodeDecl();
+}
+
+const CFG& BugReporterContext::getCFG() {
+  return *BR.getEngine().getAnalysisManager().getCFG();
+}
+
 //===----------------------------------------------------------------------===//
 // Helper routines for walking the ExplodedGraph and fetching statements.
 //===----------------------------------------------------------------------===//