15 #ifndef LLVM_CLANG_STATICANALYZER_CORE_ANALYZEROPTIONS_H 16 #define LLVM_CLANG_STATICANALYZER_CORE_ANALYZEROPTIONS_H 19 #include "llvm/ADT/IntrusiveRefCntPtr.h" 20 #include "llvm/ADT/Optional.h" 21 #include "llvm/ADT/StringMap.h" 22 #include "llvm/ADT/StringRef.h" 23 #include "llvm/ADT/StringSwitch.h" 38 #define ANALYSIS(NAME, CMDFLAG, DESC, SCOPE) NAME, 39 #include "clang/StaticAnalyzer/Core/Analyses.def" 45 #define ANALYSIS_STORE(NAME, CMDFLAG, DESC, CREATFN) NAME##Model, 46 #include "clang/StaticAnalyzer/Core/Analyses.def" 52 #define ANALYSIS_CONSTRAINTS(NAME, CMDFLAG, DESC, CREATFN) NAME##Model, 53 #include "clang/StaticAnalyzer/Core/Analyses.def" 60 #define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATFN) PD_##NAME, 61 #include "clang/StaticAnalyzer/Core/Analyses.def" 68 #define ANALYSIS_PURGE(NAME, CMDFLAG, DESC) NAME, 69 #include "clang/StaticAnalyzer/Core/Analyses.def" 75 #define ANALYSIS_INLINING_MODE(NAME, CMDFLAG, DESC) NAME, 76 #include "clang/StaticAnalyzer/Core/Analyses.def" 167 static std::vector<StringRef>
168 getRegisteredCheckers(
bool IncludeExperimental =
false);
221 unsigned InlineMaxStackDepth = 5;
227 #define ANALYZER_OPTION_DEPENDS_ON_USER_MODE(TYPE, NAME, CMDFLAG, DESC, \ 228 SHALLOW_VAL, DEEP_VAL) \ 229 ANALYZER_OPTION(TYPE, NAME, CMDFLAG, DESC, SHALLOW_VAL) 231 #define ANALYZER_OPTION(TYPE, NAME, CMDFLAG, DESC, DEFAULT_VAL) \ 234 #include "clang/StaticAnalyzer/Core/AnalyzerOptions.def" 235 #undef ANALYZER_OPTION 236 #undef ANALYZER_OPTION_DEPENDS_ON_USER_MODE 240 std::vector<StringRef> AnalyzerConfigCmdFlags = {
241 #define ANALYZER_OPTION_DEPENDS_ON_USER_MODE(TYPE, NAME, CMDFLAG, DESC, \ 242 SHALLOW_VAL, DEEP_VAL) \ 243 ANALYZER_OPTION(TYPE, NAME, CMDFLAG, DESC, SHALLOW_VAL) 245 #define ANALYZER_OPTION(TYPE, NAME, CMDFLAG, DESC, DEFAULT_VAL) \ 248 #include "clang/StaticAnalyzer/Core/AnalyzerOptions.def" 249 #undef ANALYZER_OPTION 250 #undef ANALYZER_OPTION_DEPENDS_ON_USER_MODE 255 assert(std::is_sorted(AnalyzerConfigCmdFlags.begin(),
256 AnalyzerConfigCmdFlags.end()));
258 return !std::binary_search(AnalyzerConfigCmdFlags.begin(),
259 AnalyzerConfigCmdFlags.end(), Name);
263 : DisableAllChecks(
false), ShowCheckerHelp(
false),
264 ShowEnabledCheckerList(
false), ShowConfigOptionsList(
false),
265 AnalyzeAll(
false), AnalyzerDisplayProgress(
false),
266 AnalyzeNestedBlocks(
false), eagerlyAssumeBinOpBifurcation(
false),
267 TrimGraph(
false), visualizeExplodedGraphWithGraphViz(
false),
269 llvm::sort(AnalyzerConfigCmdFlags);
286 bool getCheckerBooleanOption(StringRef Name,
bool DefaultVal,
288 bool SearchInParents =
false)
const;
304 int getCheckerIntegerOption(StringRef Name,
int DefaultVal,
306 bool SearchInParents =
false)
const;
321 StringRef getCheckerStringOption(StringRef Name, StringRef DefaultVal,
323 bool SearchInParents =
false)
const;
355 auto K = llvm::StringSwitch<llvm::Optional<UserModeKind>>(UserMode)
359 assert(K.hasValue() &&
"User mode is invalid.");
365 #endif // LLVM_CLANG_STATICANALYZER_CORE_ANALYZEROPTIONS_H
Inline C functions and blocks when their definitions are available.
IPAKind
Describes the different modes of inter-procedural analysis.
unsigned visualizeExplodedGraphWithGraphViz
Perform only intra-procedural analysis.
UserModeKind getUserMode() const
Retrieves and sets the UserMode.
A dummy mode in which no C++ inlining is enabled.
Inline callees(C, C++, ObjC) when their definitions are available.
std::string DumpExplodedGraphTo
File path to which the exploded graph should be dumped.
unsigned eagerlyAssumeBinOpBifurcation
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
std::string FullCompilerInvocation
Store full compiler invocation for reproducible instructions in the generated report.
std::vector< std::pair< std::string, bool > > CheckersControlList
Pair of checker name and enable/disable.
AnalysisStores
AnalysisStores - Set of available analysis store models.
unsigned ShowEnabledCheckerList
Refers to regular member function and operator calls.
unsigned ShowConfigOptionsList
AnalysisInliningMode
AnalysisInlineFunctionSelection - Set of inlining function selection heuristics.
Refers to constructors (implicit or explicit).
Enable inlining of dynamically dispatched methods.
UserModeKind
Describes the kinds for high-level analyzer mode.
AnalysisConstraints
AnalysisConstraints - Set of available constraint models.
llvm::StringMap< std::string > ConfigTable
ConfigTable Config
A key-value table of use-specified configuration values.
Refers to destructors (implicit or explicit).
bool isUnknownAnalyzerConfig(StringRef Name) const
unsigned maxBlockVisitOnPath
The maximum number of times the analyzer visits a block.
unsigned DisableAllChecks
Disable all analyzer checks.
Dataflow Directional Tag Classes.
Perform shallow but fast analyzes.
std::string AnalyzeSpecificFunction
AnalysisPurgeMode
AnalysisPurgeModes - Set of available strategies for dead symbol removal.
Stores options for the analyzer from the command line.
unsigned AnalyzerDisplayProgress
unsigned AnalyzeNestedBlocks
unsigned NoRetryExhausted
Do not re-analyze paths leading to exhausted nodes with a different strategy.
Analyses
Analysis - Set of available source code analyses.
CXXInlineableMemberKind
Describes the different kinds of C++ member functions which can be considered for inlining by the ana...
unsigned ShouldEmitErrorsOnInvalidConfigValue
Enable inlining of dynamically dispatched methods, bifurcate paths when exact type info is unavailabl...
AnalysisDiagClients
AnalysisDiagClients - Set of available diagnostic clients for rendering analysis results.