aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
diff options
context:
space:
mode:
authorBalazs Benics <balazs.benics@sigmatechnology.se>2022-06-14 09:20:41 +0200
committerBalazs Benics <balazs.benics@sigmatechnology.se>2022-06-14 09:20:41 +0200
commitffe7950ebc62380c3afc7c71f454a1db3f6f5c76 (patch)
tree7b3eb0d90acc5d04875c92384a6435d5dd0184a7 /clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
parent8091f7120c6be15266ddd060c56d1997850ffbd0 (diff)
downloadllvm-ffe7950ebc62380c3afc7c71f454a1db3f6f5c76.zip
llvm-ffe7950ebc62380c3afc7c71f454a1db3f6f5c76.tar.gz
llvm-ffe7950ebc62380c3afc7c71f454a1db3f6f5c76.tar.bz2
Reland "[analyzer] Deprecate `-analyzer-store region` flag"
I'm trying to remove unused options from the `Analyses.def` file, then merge the rest of the useful options into the `AnalyzerOptions.def`. Then make sure one can set these by an `-analyzer-config XXX=YYY` style flag. Then surface the `-analyzer-config` to the `clang` frontend; After all of this, we can pursue the tablegen approach described https://discourse.llvm.org/t/rfc-tablegen-clang-static-analyzer-engine-options-for-better-documentation/61488 In this patch, I'm proposing flag deprecations. We should support deprecated analyzer flags for exactly one release. In this case I'm planning to drop this flag in `clang-16`. In the clang frontend, now we won't pass this option to the cc1 frontend, rather emit a warning diagnostic reminding the users about this deprecated flag, which will be turned into error in clang-16. Unfortunately, I had to remove all the tests referring to this flag, causing a mass change. I've also added a test for checking this warning. I've seen that `scan-build` also uses this flag, but I think we should remove that part only after we turn this into a hard error. Reviewed By: martong Differential Revision: https://reviews.llvm.org/D126215
Diffstat (limited to 'clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
index ad438f6..f38a32f 100644
--- a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
+++ b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
@@ -171,13 +171,7 @@ public:
}
// Create the analyzer component creators.
- switch (Opts->AnalysisStoreOpt) {
- default:
- llvm_unreachable("Unknown store manager.");
-#define ANALYSIS_STORE(NAME, CMDFLAG, DESC, CREATEFN) \
- case NAME##Model: CreateStoreMgr = CREATEFN; break;
-#include "clang/StaticAnalyzer/Core/Analyses.def"
- }
+ CreateStoreMgr = &CreateRegionStoreManager;
switch (Opts->AnalysisConstraintsOpt) {
default: