summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorKristof Umann <dkszelethus@gmail.com>2019-08-15 08:53:16 +0000
committerKristof Umann <dkszelethus@gmail.com>2019-08-15 08:53:16 +0000
commita1aef90bdd9ae7febce70f96f4a05a0074c8b556 (patch)
treefb275e9609396086561dee4ed83702cff555fb62 /clang/lib
parente6e133b7007635b7445c7d15806e9e418f38866c (diff)
downloadbcm5719-llvm-a1aef90bdd9ae7febce70f96f4a05a0074c8b556.tar.gz
bcm5719-llvm-a1aef90bdd9ae7febce70f96f4a05a0074c8b556.zip
[analyzer] Warn about -analyzer-configs being meant for development purposes only
This is more of a temporary fix, long term, we should convert AnalyzerOptions.def into the universally beloved (*coughs*) TableGen format, where they can more easily be separated into developer-only, alpha, and user-facing configs. Differential Revision: https://reviews.llvm.org/D66261 llvm-svn: 368980
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp b/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
index 9571679ef12..f4f06e32cd1 100644
--- a/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
+++ b/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
@@ -74,11 +74,22 @@ void ento::printCheckerConfigList(raw_ostream &OS,
}
void ento::printAnalyzerConfigList(raw_ostream &out) {
- out << "OVERVIEW: Clang Static Analyzer -analyzer-config Option List\n\n";
- out << "USAGE: -analyzer-config <OPTION1=VALUE,OPTION2=VALUE,...>\n\n";
- out << " -analyzer-config OPTION1=VALUE, -analyzer-config "
- "OPTION2=VALUE, ...\n\n";
- out << "OPTIONS:\n\n";
+ // FIXME: This message sounds scary, should be scary, but incorrectly states
+ // that all configs are super dangerous. In reality, many of them should be
+ // accessible to the user. We should create a user-facing subset of config
+ // options under a different frontend flag.
+ out << R"(
+OVERVIEW: Clang Static Analyzer -analyzer-config Option List
+
+The following list of configurations are meant for development purposes only, as
+some of the variables they define are set to result in the most optimal
+analysis. Setting them to other values may drastically change how the analyzer
+behaves, and may even result in instabilities, crashes!
+
+USAGE: -analyzer-config <OPTION1=VALUE,OPTION2=VALUE,...>
+ -analyzer-config OPTION1=VALUE, -analyzer-config OPTION2=VALUE, ...
+OPTIONS:
+)";
using OptionAndDescriptionTy = std::pair<StringRef, std::string>;
OptionAndDescriptionTy PrintableOptions[] = {
OpenPOWER on IntegriCloud