24 out <<
"OVERVIEW: Clang Static Analyzer Checkers List\n\n";
25 out <<
"USAGE: -analyzer-checker <CHECKER or PACKAGE,...>\n\n";
27 auto CheckerMgr = std::make_unique<CheckerManager>(
31 CheckerMgr->getCheckerRegistryData().printCheckerWithDescList(
36 out <<
"OVERVIEW: Clang Static Analyzer Enabled Checkers List\n\n";
38 auto CheckerMgr = std::make_unique<CheckerManager>(
42 CheckerMgr->getCheckerRegistryData().printEnabledCheckerList(
out);
47 auto CheckerMgr = std::make_unique<CheckerManager>(
51 CheckerMgr->getCheckerRegistryData().printCheckerOptionList(
61OVERVIEW: Clang Static Analyzer -analyzer-config Option List
63The following list of configurations are meant for development purposes only, as
64some of the variables they define are set to result in the most optimal
65analysis. Setting them to other values may drastically change how the analyzer
66behaves, and may even result in instabilities, crashes!
68USAGE: -analyzer-config <OPTION1=VALUE,OPTION2=VALUE,...>
69 -analyzer-config OPTION1=VALUE, -analyzer-config OPTION2=VALUE, ...
73 using OptionAndDescriptionTy = std::pair<StringRef, std::string>;
74 OptionAndDescriptionTy PrintableOptions[] = {
75#define ANALYZER_OPTION(TYPE, NAME, CMDFLAG, DESC, DEFAULT_VAL) \
78 llvm::Twine(llvm::Twine() + "(" + \
79 (StringRef(#TYPE) == "StringRef" ? "string" : #TYPE ) + \
81 " (default: " #DEFAULT_VAL ")").str() \
84#define ANALYZER_OPTION_DEPENDS_ON_USER_MODE(TYPE, NAME, CMDFLAG, DESC, \
85 SHALLOW_VAL, DEEP_VAL) \
88 llvm::Twine(llvm::Twine() + "(" + \
89 (StringRef(#TYPE) == "StringRef" ? "string" : #TYPE ) + \
91 " (default: " #SHALLOW_VAL " in shallow mode, " #DEEP_VAL \
92 " in deep mode)").str() \
94#include "clang/StaticAnalyzer/Core/AnalyzerOptions.def"
96#undef ANALYZER_OPTION_DEPENDS_ON_USER_MODE
99 llvm::sort(PrintableOptions, llvm::less_first());
101 for (
const auto &Pair : PrintableOptions) {
static void printFormattedEntry(llvm::raw_ostream &Out, std::pair< StringRef, StringRef > EntryDescPair, size_t InitialPad, size_t EntryWidth, size_t MinLineWidth=0)
Convenience function for printing options or checkers and their description in a formatted manner.
CompilerInstance - Helper class for managing a single instance of the Clang compiler.
AnalyzerOptions & getAnalyzerOpts()
DiagnosticsEngine & getDiagnostics() const
Get the current diagnostics engine.
FrontendOptions & getFrontendOpts()
LangOptions & getLangOpts()
std::vector< std::string > Plugins
The list of plugins to load.
void printEnabledCheckerList(llvm::raw_ostream &OS, CompilerInstance &CI)
void printCheckerHelp(llvm::raw_ostream &OS, CompilerInstance &CI)
void printAnalyzerConfigList(llvm::raw_ostream &OS)
void printCheckerConfigList(llvm::raw_ostream &OS, CompilerInstance &CI)
The JSON file list parser is used to communicate input to InstallAPI.