[analyzer] Don't display implementation checkers under -analyzer-checker-help, but...
authorKristof Umann <kristof.umann@ericsson.com>
Wed, 1 May 2019 19:56:47 +0000 (19:56 +0000)
committerKristof Umann <kristof.umann@ericsson.com>
Wed, 1 May 2019 19:56:47 +0000 (19:56 +0000)
commit9f7fc9838a21e0d7c67233f9dd2d17a63f6b0655
tree97db518b6d449d87385f9421928a230b0ab4d293
parent20c5676416d3b1fff74ee4603d4eb1c646ae22bd
[analyzer] Don't display implementation checkers under -analyzer-checker-help, but do under the new flag -analyzer-checker-help-hidden

During my work on analyzer dependencies, I created a great amount of new
checkers that emitted no diagnostics at all, and were purely modeling some
function or another.

However, the user shouldn't really disable/enable these by hand, hence this
patch, which hides these by default. I intentionally chose not to hide alpha
checkers, because they have a scary enough name, in my opinion, to cause no
surprise when they emit false positives or cause crashes.

The patch introduces the Hidden bit into the TableGen files (you may remember
it before I removed it in D53995), and checkers that are either marked as
hidden, or are in a package that is marked hidden won't be displayed under
-analyzer-checker-help. -analyzer-checker-help-hidden, a new flag meant for
developers only, displays the full list.

Differential Revision: https://reviews.llvm.org/D60925

llvm-svn: 359720
13 files changed:
clang/include/clang/Driver/CC1Options.td
clang/include/clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h
clang/include/clang/StaticAnalyzer/Checkers/CheckerBase.td
clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
clang/include/clang/StaticAnalyzer/Frontend/CheckerRegistry.h
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
clang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp
clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp
clang/test/Analysis/show-checker-list.c [new file with mode: 0644]
clang/utils/TableGen/ClangSACheckersEmitter.cpp