diff options
Diffstat (limited to 'lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp b/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp index 1c31c35b75..4ad362fe1e 100644 --- a/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp +++ b/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp @@ -1,9 +1,8 @@ //===--- CheckerRegistration.cpp - Registration for the Analyzer Checkers -===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // @@ -34,33 +33,36 @@ std::unique_ptr<CheckerManager> ento::createCheckerManager( DiagnosticsEngine &diags) { auto checkerMgr = llvm::make_unique<CheckerManager>(context, opts); - CheckerRegistry allCheckers(plugins, diags); - - for (const auto &Fn : checkerRegistrationFns) - Fn(allCheckers); + CheckerRegistry allCheckers(plugins, diags, opts, context.getLangOpts(), + checkerRegistrationFns); - allCheckers.initializeManager(*checkerMgr, opts); - allCheckers.validateCheckerOptions(opts); + allCheckers.initializeManager(*checkerMgr); + allCheckers.validateCheckerOptions(); checkerMgr->finishedCheckerRegistration(); return checkerMgr; } void ento::printCheckerHelp(raw_ostream &out, ArrayRef<std::string> plugins, - DiagnosticsEngine &diags) { + AnalyzerOptions &anopts, + DiagnosticsEngine &diags, + const LangOptions &langOpts) { out << "OVERVIEW: Clang Static Analyzer Checkers List\n\n"; out << "USAGE: -analyzer-checker <CHECKER or PACKAGE,...>\n\n"; - CheckerRegistry(plugins, diags).printHelp(out); + CheckerRegistry(plugins, diags, anopts, langOpts) + .printCheckerWithDescList(out); } void ento::printEnabledCheckerList(raw_ostream &out, ArrayRef<std::string> plugins, - const AnalyzerOptions &opts, - DiagnosticsEngine &diags) { + AnalyzerOptions &anopts, + DiagnosticsEngine &diags, + const LangOptions &langOpts) { out << "OVERVIEW: Clang Static Analyzer Enabled Checkers List\n\n"; - CheckerRegistry(plugins, diags).printList(out, opts); + CheckerRegistry(plugins, diags, anopts, langOpts) + .printEnabledCheckerList(out); } void ento::printAnalyzerConfigList(raw_ostream &out) { |