[analyzer] Add ASTContext to CheckerManager

Some checkers require ASTContext. Having it in the constructor saves a
lot of boilerplate of having to pass it around.

Differential Revision: https://reviews.llvm.org/D50111

llvm-svn: 339079
diff --git a/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp b/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
index a260c2d..76e66cc 100644
--- a/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
+++ b/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
@@ -112,12 +112,12 @@
 }
 
 std::unique_ptr<CheckerManager> ento::createCheckerManager(
-    AnalyzerOptions &opts, const LangOptions &langOpts,
+    ASTContext &context,
+    AnalyzerOptions &opts,
     ArrayRef<std::string> plugins,
     ArrayRef<std::function<void(CheckerRegistry &)>> checkerRegistrationFns,
     DiagnosticsEngine &diags) {
-  std::unique_ptr<CheckerManager> checkerMgr(
-      new CheckerManager(langOpts, opts));
+  auto checkerMgr = llvm::make_unique<CheckerManager>(context, opts);
 
   SmallVector<CheckerOptInfo, 8> checkerOpts = getCheckerOptList(opts);