diff options
author | Kristof Umann <dkszelethus@gmail.com> | 2019-01-26 15:59:21 +0000 |
---|---|---|
committer | Kristof Umann <dkszelethus@gmail.com> | 2019-01-26 15:59:21 +0000 |
commit | d080f935ce18612f028f65f6bd7c6632ded46729 (patch) | |
tree | 0ccaeb406c576b5c737100b906ff3fe953ce09d7 /include | |
parent | d295a8dda428d1ebecf7178d23c0919c9ea42c5c (diff) | |
download | clang-d080f935ce18612f028f65f6bd7c6632ded46729.tar.gz |
[analyzer][NFC] Supply CheckerRegistry with AnalyzerOptions
Since pretty much all methods of CheckerRegistry has AnalyzerOptions as an
argument, it makes sense to just simply require it in it's constructor.
Differential Revision: https://reviews.llvm.org/D56988
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352279 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/StaticAnalyzer/Frontend/CheckerRegistry.h | 12 | ||||
-rw-r--r-- | include/clang/StaticAnalyzer/Frontend/FrontendActions.h | 9 |
2 files changed, 12 insertions, 9 deletions
diff --git a/include/clang/StaticAnalyzer/Frontend/CheckerRegistry.h b/include/clang/StaticAnalyzer/Frontend/CheckerRegistry.h index a30e3a7a18..f394ed911b 100644 --- a/include/clang/StaticAnalyzer/Frontend/CheckerRegistry.h +++ b/include/clang/StaticAnalyzer/Frontend/CheckerRegistry.h @@ -82,7 +82,7 @@ namespace ento { class CheckerRegistry { public: CheckerRegistry(ArrayRef<std::string> plugins, DiagnosticsEngine &diags, - const LangOptions &LangOpts); + AnalyzerOptions &AnOpts, const LangOptions &LangOpts); /// Initialization functions perform any necessary setup for a checker. /// They should include a call to CheckerManager::registerChecker. @@ -137,24 +137,24 @@ public: /// all checkers specified by the given CheckerOptInfo list. The order of this /// list is significant; later options can be used to reverse earlier ones. /// This can be used to exclude certain checkers in an included package. - void initializeManager(CheckerManager &mgr, - const AnalyzerOptions &Opts) const; + void initializeManager(CheckerManager &mgr) const; /// Check if every option corresponds to a specific checker or package. - void validateCheckerOptions(const AnalyzerOptions &opts) const; + void validateCheckerOptions() const; /// Prints the name and description of all checkers in this registry. /// This output is not intended to be machine-parseable. void printHelp(raw_ostream &out, size_t maxNameChars = 30) const; - void printList(raw_ostream &out, const AnalyzerOptions &opts) const; + void printList(raw_ostream &out) const; private: - CheckerInfoSet getEnabledCheckers(const AnalyzerOptions &Opts) const; + CheckerInfoSet getEnabledCheckers() const; mutable CheckerInfoList Checkers; mutable llvm::StringMap<size_t> Packages; DiagnosticsEngine &Diags; + AnalyzerOptions &AnOpts; const LangOptions &LangOpts; }; diff --git a/include/clang/StaticAnalyzer/Frontend/FrontendActions.h b/include/clang/StaticAnalyzer/Frontend/FrontendActions.h index f8bd24df2b..5f26a4893c 100644 --- a/include/clang/StaticAnalyzer/Frontend/FrontendActions.h +++ b/include/clang/StaticAnalyzer/Frontend/FrontendActions.h @@ -51,10 +51,13 @@ private: llvm::StringMap<Stmt *> &Bodies; }; -void printCheckerHelp(raw_ostream &OS, ArrayRef<std::string> plugins, - DiagnosticsEngine &diags, const LangOptions &LangOpts); +void printCheckerHelp(raw_ostream &OS, + ArrayRef<std::string> plugins, + AnalyzerOptions &opts, + DiagnosticsEngine &diags, + const LangOptions &LangOpts); void printEnabledCheckerList(raw_ostream &OS, ArrayRef<std::string> plugins, - const AnalyzerOptions &opts, + AnalyzerOptions &opts, DiagnosticsEngine &diags, const LangOptions &LangOpts); void printAnalyzerConfigList(raw_ostream &OS); |