summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
diff options
context:
space:
mode:
authorGeorge Karpenkov <ekarpenkov@apple.com>2018-08-06 23:09:07 +0000
committerGeorge Karpenkov <ekarpenkov@apple.com>2018-08-06 23:09:07 +0000
commit4ece68a0a8d2f788761b898f8142534a456d7dd5 (patch)
treecf1a79b1146ffa6f4c2aa8e02e1c58f620506792 /clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
parent08f3fe4fae9f54e796471e2afa7e2b11be2041bb (diff)
downloadbcm5719-llvm-4ece68a0a8d2f788761b898f8142534a456d7dd5.tar.gz
bcm5719-llvm-4ece68a0a8d2f788761b898f8142534a456d7dd5.zip
[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
Diffstat (limited to 'clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp b/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
index a260c2d85b1..76e66cc0230 100644
--- a/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
+++ b/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
@@ -112,12 +112,12 @@ getCheckerOptList(const AnalyzerOptions &opts) {
}
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);
OpenPOWER on IntegriCloud