[PATCH] D66042: [analyzer] Analysis: Silence checkers
Kristóf Umann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 14 07:16:51 PDT 2019
Szelethus added a comment.
Thanks!!! Please note that BugReporter.cpp (especially the parts you touched) just got refactored extensively, so you'll need to rebase on master.
================
Comment at: clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:192
/// Pair of checker name and enable/disable.
- std::vector<std::pair<std::string, bool>> CheckersControlList;
+ std::vector<std::pair<std::string, bool>> Checkers;
+
----------------
Hmm, this doesn't really describe what this field does, does it? This isn't even the entire list, only those explicitly specified by `-analyzer-checker` and `-analyzer-disable-checker`. Besides, package names are also in this container. How about any of these:
* `EnabledCheckersAndPackages`
* `EnabledCheckers`
* `CheckerAndPackageUserInput` (this may just be the name that describes whats happening here the best)
* `CheckerUserInput`
================
Comment at: clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:195
+ /// Vector of checker names which will not emit warnings.
+ std::vector<std::string> SilencedCheckers;
----------------
Same here. I realize the name of the field could get ridiculously long, how about we leave this as-is but mention it in the comments that packages are also included?
================
Comment at: clang/lib/StaticAnalyzer/Core/BugReporter.cpp:1924
+
+ // See whether we need to silence the checker.
+ for (const std::string &CheckerName : Opts.SilencedCheckers) {
----------------
Could you please add a `FIXME` about that this will not work if the report was emitted with the incorrect tag?
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66042/new/
https://reviews.llvm.org/D66042
More information about the cfe-commits
mailing list