clang  15.0.0git
AnalyzerOptions.h
Go to the documentation of this file.
1 //===- AnalyzerOptions.h - Analysis Engine Options --------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This header defines various options for the static analyzer that are set
10 // by the frontend and are consulted throughout the analyzer.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CLANG_STATICANALYZER_CORE_ANALYZEROPTIONS_H
15 #define LLVM_CLANG_STATICANALYZER_CORE_ANALYZEROPTIONS_H
16 
18 #include "clang/Basic/LLVM.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"
24 #include <string>
25 #include <utility>
26 #include <vector>
27 
28 namespace clang {
29 
30 namespace ento {
31 
32 class CheckerBase;
33 
34 } // namespace ento
35 
36 /// Analysis - Set of available source code analyses.
37 enum Analyses {
38 #define ANALYSIS(NAME, CMDFLAG, DESC, SCOPE) NAME,
39 #include "clang/StaticAnalyzer/Core/Analyses.def"
41 };
42 
43 /// AnalysisStores - Set of available analysis store models.
45 #define ANALYSIS_STORE(NAME, CMDFLAG, DESC, CREATFN) NAME##Model,
46 #include "clang/StaticAnalyzer/Core/Analyses.def"
48 };
49 
50 /// AnalysisConstraints - Set of available constraint models.
52 #define ANALYSIS_CONSTRAINTS(NAME, CMDFLAG, DESC, CREATFN) NAME##Model,
53 #include "clang/StaticAnalyzer/Core/Analyses.def"
55 };
56 
57 /// AnalysisDiagClients - Set of available diagnostic clients for rendering
58 /// analysis results.
60 #define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATFN) PD_##NAME,
61 #include "clang/StaticAnalyzer/Core/Analyses.def"
64 };
65 
66 /// AnalysisPurgeModes - Set of available strategies for dead symbol removal.
68 #define ANALYSIS_PURGE(NAME, CMDFLAG, DESC) NAME,
69 #include "clang/StaticAnalyzer/Core/Analyses.def"
71 };
72 
73 /// AnalysisInlineFunctionSelection - Set of inlining function selection heuristics.
75 #define ANALYSIS_INLINING_MODE(NAME, CMDFLAG, DESC) NAME,
76 #include "clang/StaticAnalyzer/Core/Analyses.def"
78 };
79 
80 /// Describes the different kinds of C++ member functions which can be
81 /// considered for inlining by the analyzer.
82 ///
83 /// These options are cumulative; enabling one kind of member function will
84 /// enable all kinds with lower enum values.
86  // Uninitialized = 0,
87 
88  /// A dummy mode in which no C++ inlining is enabled.
90 
91  /// Refers to regular member function and operator calls.
93 
94  /// Refers to constructors (implicit or explicit).
95  ///
96  /// Note that a constructor will not be inlined if the corresponding
97  /// destructor is non-trivial.
99 
100  /// Refers to destructors (implicit or explicit).
102 };
103 
104 /// Describes the different modes of inter-procedural analysis.
105 enum IPAKind {
106  /// Perform only intra-procedural analysis.
108 
109  /// Inline C functions and blocks when their definitions are available.
111 
112  /// Inline callees(C, C++, ObjC) when their definitions are available.
114 
115  /// Enable inlining of dynamically dispatched methods.
117 
118  /// Enable inlining of dynamically dispatched methods, bifurcate paths when
119  /// exact type info is unavailable.
121 };
122 
124  DFS,
125  BFS,
130 };
131 
132 /// Describes the kinds for high-level analyzer mode.
134  /// Perform shallow but fast analyzes.
136 
137  /// Perform deep analyzes.
139 };
140 
142 
143 /// Stores options for the analyzer from the command line.
144 ///
145 /// Some options are frontend flags (e.g.: -analyzer-output), but some are
146 /// analyzer configuration options, which are preceded by -analyzer-config
147 /// (e.g.: -analyzer-config notes-as-events=true).
148 ///
149 /// If you'd like to add a new frontend flag, add it to
150 /// include/clang/Driver/CC1Options.td, add a new field to store the value of
151 /// that flag in this class, and initialize it in
152 /// lib/Frontend/CompilerInvocation.cpp.
153 ///
154 /// If you'd like to add a new non-checker configuration, register it in
155 /// include/clang/StaticAnalyzer/Core/AnalyzerOptions.def, and refer to the
156 /// top of the file for documentation.
157 ///
158 /// If you'd like to add a new checker option, call getChecker*Option()
159 /// whenever.
160 ///
161 /// Some of the options are controlled by raw frontend flags for no good reason,
162 /// and should be eventually converted into -analyzer-config flags. New analyzer
163 /// options should not be implemented as frontend flags. Frontend flags still
164 /// make sense for things that do not affect the actual analysis.
165 class AnalyzerOptions : public RefCountedBase<AnalyzerOptions> {
166 public:
167  using ConfigTable = llvm::StringMap<std::string>;
168 
169  /// Retrieves the list of checkers generated from Checkers.td. This doesn't
170  /// contain statically linked but non-generated checkers and plugin checkers!
171  static std::vector<StringRef>
172  getRegisteredCheckers(bool IncludeExperimental = false);
173 
174  /// Retrieves the list of packages generated from Checkers.td. This doesn't
175  /// contain statically linked but non-generated packages and plugin packages!
176  static std::vector<StringRef>
177  getRegisteredPackages(bool IncludeExperimental = false);
178 
179  /// Convenience function for printing options or checkers and their
180  /// description in a formatted manner. If \p MinLineWidth is set to 0, no line
181  /// breaks are introduced for the description.
182  ///
183  /// Format, depending whether the option name's length is less than
184  /// \p EntryWidth:
185  ///
186  /// <padding>EntryName<padding>Description
187  /// <---------padding--------->Description
188  /// <---------padding--------->Description
189  ///
190  /// <padding>VeryVeryLongEntryName
191  /// <---------padding--------->Description
192  /// <---------padding--------->Description
193  /// ^~~~~~~~~InitialPad
194  /// ^~~~~~~~~~~~~~~~~~EntryWidth
195  /// ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~MinLineWidth
196  static void printFormattedEntry(llvm::raw_ostream &Out,
197  std::pair<StringRef, StringRef> EntryDescPair,
198  size_t InitialPad, size_t EntryWidth,
199  size_t MinLineWidth = 0);
200 
201  /// Pairs of checker/package name and enable/disable.
202  std::vector<std::pair<std::string, bool>> CheckersAndPackages;
203 
204  /// Vector of checker/package names which will not emit warnings.
205  std::vector<std::string> SilencedCheckersAndPackages;
206 
207  /// A key-value table of use-specified configuration values.
208  // TODO: This shouldn't be public.
210  AnalysisStores AnalysisStoreOpt = RegionStoreModel;
214 
216 
217  /// File path to which the exploded graph should be dumped.
219 
220  /// Store full compiler invocation for reproducible instructions in the
221  /// generated report.
223 
224  /// The maximum number of times the analyzer visits a block.
226 
227  /// Disable all analyzer checkers.
228  ///
229  /// This flag allows one to disable analyzer checkers on the code processed by
230  /// the given analysis consumer. Note, the code will get parsed and the
231  /// command-line options will get checked.
232  unsigned DisableAllCheckers : 1;
233 
234  unsigned ShowCheckerHelp : 1;
235  unsigned ShowCheckerHelpAlpha : 1;
237 
238  unsigned ShowCheckerOptionList : 1;
241 
243  unsigned ShowConfigOptionsList : 1;
245  unsigned AnalyzeAll : 1;
247  unsigned AnalyzeNestedBlocks : 1;
248 
250 
251  unsigned TrimGraph : 1;
253  unsigned UnoptimizedCFG : 1;
254  unsigned PrintStats : 1;
255 
256  /// Do not re-analyze paths leading to exhausted nodes with a different
257  /// strategy. We get better code coverage when retry is enabled.
258  unsigned NoRetryExhausted : 1;
259 
260  /// Emit analyzer warnings as errors.
261  bool AnalyzerWerror : 1;
262 
263  /// The inlining stack depth limit.
265 
266  /// The mode of function selection used during inlining.
268 
269  // Create a field for each -analyzer-config option.
270 #define ANALYZER_OPTION_DEPENDS_ON_USER_MODE(TYPE, NAME, CMDFLAG, DESC, \
271  SHALLOW_VAL, DEEP_VAL) \
272  ANALYZER_OPTION(TYPE, NAME, CMDFLAG, DESC, SHALLOW_VAL)
273 
274 #define ANALYZER_OPTION(TYPE, NAME, CMDFLAG, DESC, DEFAULT_VAL) \
275  TYPE NAME;
276 
277 #include "clang/StaticAnalyzer/Core/AnalyzerOptions.def"
278 #undef ANALYZER_OPTION
279 #undef ANALYZER_OPTION_DEPENDS_ON_USER_MODE
280 
281  // Create an array of all -analyzer-config command line options. Sort it in
282  // the constructor.
283  std::vector<llvm::StringLiteral> AnalyzerConfigCmdFlags = {
284 #define ANALYZER_OPTION_DEPENDS_ON_USER_MODE(TYPE, NAME, CMDFLAG, DESC, \
285  SHALLOW_VAL, DEEP_VAL) \
286  ANALYZER_OPTION(TYPE, NAME, CMDFLAG, DESC, SHALLOW_VAL)
287 
288 #define ANALYZER_OPTION(TYPE, NAME, CMDFLAG, DESC, DEFAULT_VAL) \
289  llvm::StringLiteral(CMDFLAG),
290 
291 #include "clang/StaticAnalyzer/Core/AnalyzerOptions.def"
292 #undef ANALYZER_OPTION
293 #undef ANALYZER_OPTION_DEPENDS_ON_USER_MODE
294  };
295 
296  bool isUnknownAnalyzerConfig(StringRef Name) const {
297  assert(llvm::is_sorted(AnalyzerConfigCmdFlags));
298 
299  return !std::binary_search(AnalyzerConfigCmdFlags.begin(),
300  AnalyzerConfigCmdFlags.end(), Name);
301  }
302 
313  llvm::sort(AnalyzerConfigCmdFlags);
314  }
315 
316  /// Interprets an option's string value as a boolean. The "true" string is
317  /// interpreted as true and the "false" string is interpreted as false.
318  ///
319  /// If an option value is not provided, returns the given \p DefaultVal.
320  /// @param [in] CheckerName The *full name* of the checker. One may retrieve
321  /// this from the checker object's field \c Name, or through \c
322  /// CheckerManager::getCurrentCheckerName within the checker's registry
323  /// function.
324  /// Checker options are retrieved in the following format:
325  /// `-analyzer-config CheckerName:OptionName=Value.
326  /// @param [in] OptionName Name for option to retrieve.
327  /// @param [in] SearchInParents If set to true and the searched option was not
328  /// specified for the given checker the options for the parent packages will
329  /// be searched as well. The inner packages take precedence over the outer
330  /// ones.
331  bool getCheckerBooleanOption(StringRef CheckerName, StringRef OptionName,
332  bool SearchInParents = false) const;
333 
334  bool getCheckerBooleanOption(const ento::CheckerBase *C, StringRef OptionName,
335  bool SearchInParents = false) const;
336 
337  /// Interprets an option's string value as an integer value.
338  ///
339  /// If an option value is not provided, returns the given \p DefaultVal.
340  /// @param [in] CheckerName The *full name* of the checker. One may retrieve
341  /// this from the checker object's field \c Name, or through \c
342  /// CheckerManager::getCurrentCheckerName within the checker's registry
343  /// function.
344  /// Checker options are retrieved in the following format:
345  /// `-analyzer-config CheckerName:OptionName=Value.
346  /// @param [in] OptionName Name for option to retrieve.
347  /// @param [in] SearchInParents If set to true and the searched option was not
348  /// specified for the given checker the options for the parent packages will
349  /// be searched as well. The inner packages take precedence over the outer
350  /// ones.
351  int getCheckerIntegerOption(StringRef CheckerName, StringRef OptionName,
352  bool SearchInParents = false) const;
353 
354  int getCheckerIntegerOption(const ento::CheckerBase *C, StringRef OptionName,
355  bool SearchInParents = false) const;
356 
357  /// Query an option's string value.
358  ///
359  /// If an option value is not provided, returns the given \p DefaultVal.
360  /// @param [in] CheckerName The *full name* of the checker. One may retrieve
361  /// this from the checker object's field \c Name, or through \c
362  /// CheckerManager::getCurrentCheckerName within the checker's registry
363  /// function.
364  /// Checker options are retrieved in the following format:
365  /// `-analyzer-config CheckerName:OptionName=Value.
366  /// @param [in] OptionName Name for option to retrieve.
367  /// @param [in] SearchInParents If set to true and the searched option was not
368  /// specified for the given checker the options for the parent packages will
369  /// be searched as well. The inner packages take precedence over the outer
370  /// ones.
371  StringRef getCheckerStringOption(StringRef CheckerName, StringRef OptionName,
372  bool SearchInParents = false) const;
373 
374  StringRef getCheckerStringOption(const ento::CheckerBase *C,
375  StringRef OptionName,
376  bool SearchInParents = false) const;
377 
378  /// Retrieves and sets the UserMode. This is a high-level option,
379  /// which is used to set other low-level options. It is not accessible
380  /// outside of AnalyzerOptions.
381  UserModeKind getUserMode() const;
382 
385 
386  /// Returns the inter-procedural analysis mode.
387  IPAKind getIPAMode() const;
388 
389  /// Returns the option controlling which C++ member functions will be
390  /// considered for inlining.
391  ///
392  /// This is controlled by the 'c++-inlining' config option.
393  ///
394  /// \sa CXXMemberInliningMode
396 
398  return {FullCompilerInvocation,
399  ShouldDisplayMacroExpansions,
400  ShouldSerializeStats,
401  // The stable report filename option is deprecated because
402  // file names are now always stable. Now the old option acts as
403  // an alias to the new verbose filename option because this
404  // closely mimics the behavior under the old option.
405  ShouldWriteStableReportFilename || ShouldWriteVerboseReportFilename,
407  ShouldApplyFixIts,
408  ShouldDisplayCheckerNameForText};
409  }
410 };
411 
413 
414 //===----------------------------------------------------------------------===//
415 // We'll use AnalyzerOptions in the frontend, but we can't link the frontend
416 // with clangStaticAnalyzerCore, because clangStaticAnalyzerCore depends on
417 // clangFrontend.
418 //
419 // For this reason, implement some methods in this header file.
420 //===----------------------------------------------------------------------===//
421 
423  auto K = llvm::StringSwitch<llvm::Optional<UserModeKind>>(UserMode)
424  .Case("shallow", UMK_Shallow)
425  .Case("deep", UMK_Deep)
426  .Default(None);
427  assert(K.hasValue() && "User mode is invalid.");
428  return K.getValue();
429 }
430 
431 inline std::vector<StringRef>
432 AnalyzerOptions::getRegisteredCheckers(bool IncludeExperimental) {
433  static constexpr llvm::StringLiteral StaticAnalyzerCheckerNames[] = {
434 #define GET_CHECKERS
435 #define CHECKER(FULLNAME, CLASS, HELPTEXT, DOC_URI, IS_HIDDEN) \
436  llvm::StringLiteral(FULLNAME),
437 #include "clang/StaticAnalyzer/Checkers/Checkers.inc"
438 #undef CHECKER
439 #undef GET_CHECKERS
440  };
441  std::vector<StringRef> Checkers;
442  for (StringRef CheckerName : StaticAnalyzerCheckerNames) {
443  if (!CheckerName.startswith("debug.") &&
444  (IncludeExperimental || !CheckerName.startswith("alpha.")))
445  Checkers.push_back(CheckerName);
446  }
447  return Checkers;
448 }
449 
450 inline std::vector<StringRef>
451 AnalyzerOptions::getRegisteredPackages(bool IncludeExperimental) {
452  static constexpr llvm::StringLiteral StaticAnalyzerPackageNames[] = {
453 #define GET_PACKAGES
454 #define PACKAGE(FULLNAME) llvm::StringLiteral(FULLNAME),
455 #include "clang/StaticAnalyzer/Checkers/Checkers.inc"
456 #undef PACKAGE
457 #undef GET_PACKAGES
458  };
459  std::vector<StringRef> Packages;
460  for (StringRef PackageName : StaticAnalyzerPackageNames) {
461  if (PackageName != "debug" &&
462  (IncludeExperimental || PackageName != "alpha"))
463  Packages.push_back(PackageName);
464  }
465  return Packages;
466 }
467 
468 } // namespace clang
469 
470 #endif // LLVM_CLANG_STATICANALYZER_CORE_ANALYZEROPTIONS_H
clang::ento::PathDiagnosticConsumerOptions
These options tweak the behavior of path diangostic consumers.
Definition: PathDiagnostic.h:61
clang::IPAK_BasicInlining
@ IPAK_BasicInlining
Inline C functions and blocks when their definitions are available.
Definition: AnalyzerOptions.h:110
clang::AnalyzerOptions::ShowCheckerOptionDeveloperList
unsigned ShowCheckerOptionDeveloperList
Definition: AnalyzerOptions.h:240
clang::AnalyzerOptions::getRegisteredPackages
static std::vector< StringRef > getRegisteredPackages(bool IncludeExperimental=false)
Retrieves the list of packages generated from Checkers.td.
Definition: AnalyzerOptions.h:451
clang::CTUPhase1InliningKind::None
@ None
clang::AnalyzerOptions::maxBlockVisitOnPath
unsigned maxBlockVisitOnPath
The maximum number of times the analyzer visits a block.
Definition: AnalyzerOptions.h:225
string
string(SUBSTRING ${CMAKE_CURRENT_BINARY_DIR} 0 ${PATH_LIB_START} PATH_HEAD) string(SUBSTRING $
Definition: CMakeLists.txt:22
clang::AnalyzerOptions::AnalysisConstraintsOpt
AnalysisConstraints AnalysisConstraintsOpt
Definition: AnalyzerOptions.h:211
clang::AnalyzerOptions::DisableAllCheckers
unsigned DisableAllCheckers
Disable all analyzer checkers.
Definition: AnalyzerOptions.h:232
clang::ExplorationStrategyKind::DFS
@ DFS
clang::AnalyzerOptions::AnalyzerWerror
bool AnalyzerWerror
Emit analyzer warnings as errors.
Definition: AnalyzerOptions.h:261
clang::AnalyzerOptions::getUserMode
UserModeKind getUserMode() const
Retrieves and sets the UserMode.
Definition: AnalyzerOptions.h:422
clang::ExplorationStrategyKind::UnexploredFirstLocationQueue
@ UnexploredFirstLocationQueue
clang::UMK_Shallow
@ UMK_Shallow
Perform shallow but fast analyzes.
Definition: AnalyzerOptions.h:135
clang::ExplorationStrategyKind::BFS
@ BFS
clang::AnalyzerOptions::getCTUPhase1Inlining
CTUPhase1InliningKind getCTUPhase1Inlining() const
Definition: AnalyzerOptions.cpp:84
clang::AnalyzerOptions::AnalyzerOptions
AnalyzerOptions()
Definition: AnalyzerOptions.h:303
clang::CTUPhase1InliningKind::Small
@ Small
clang::AnalyzerOptions::AnalysisPurgeOpt
AnalysisPurgeMode AnalysisPurgeOpt
Definition: AnalyzerOptions.h:213
clang::IPAK_Inlining
@ IPAK_Inlining
Inline callees(C, C++, ObjC) when their definitions are available.
Definition: AnalyzerOptions.h:113
llvm::RefCountedBase
Definition: LLVM.h:49
clang::AnalyzerOptions::getExplorationStrategy
ExplorationStrategyKind getExplorationStrategy() const
Definition: AnalyzerOptions.cpp:65
clang::AnalyzerOptions::AnalyzeNestedBlocks
unsigned AnalyzeNestedBlocks
Definition: AnalyzerOptions.h:247
clang::CIMK_Constructors
@ CIMK_Constructors
Refers to constructors (implicit or explicit).
Definition: AnalyzerOptions.h:98
clang::AnalyzerOptions::getCheckerStringOption
StringRef getCheckerStringOption(StringRef CheckerName, StringRef OptionName, bool SearchInParents=false) const
Query an option's string value.
Definition: AnalyzerOptions.cpp:128
clang::AnalyzerOptions::ConfigTable
llvm::StringMap< std::string > ConfigTable
Definition: AnalyzerOptions.h:167
clang::IPAK_DynamicDispatchBifurcate
@ IPAK_DynamicDispatchBifurcate
Enable inlining of dynamically dispatched methods, bifurcate paths when exact type info is unavailabl...
Definition: AnalyzerOptions.h:120
clang::AnalyzerOptions::ShowCheckerHelpAlpha
unsigned ShowCheckerHelpAlpha
Definition: AnalyzerOptions.h:235
clang::AnalyzerOptions::mayInlineCXXMemberFunction
bool mayInlineCXXMemberFunction(CXXInlineableMemberKind K) const
Returns the option controlling which C++ member functions will be considered for inlining.
Definition: AnalyzerOptions.cpp:109
clang::AnalysisDiagClients
AnalysisDiagClients
AnalysisDiagClients - Set of available diagnostic clients for rendering analysis results.
Definition: AnalyzerOptions.h:59
clang::AnalyzerOptions::AnalyzerDisplayProgress
unsigned AnalyzerDisplayProgress
Definition: AnalyzerOptions.h:246
clang::CIMK_None
@ CIMK_None
A dummy mode in which no C++ inlining is enabled.
Definition: AnalyzerOptions.h:89
clang::AnalyzerOptions::AnalysisStoreOpt
AnalysisStores AnalysisStoreOpt
Definition: AnalyzerOptions.h:210
clang::IPAK_DynamicDispatch
@ IPAK_DynamicDispatch
Enable inlining of dynamically dispatched methods.
Definition: AnalyzerOptions.h:116
clang::AnalyzerOptions::InliningMode
AnalysisInliningMode InliningMode
The mode of function selection used during inlining.
Definition: AnalyzerOptions.h:267
clang::AnalyzerOptions::ShowEnabledCheckerList
unsigned ShowEnabledCheckerList
Definition: AnalyzerOptions.h:242
clang::AnalyzerOptions::AnalysisDiagOpt
AnalysisDiagClients AnalysisDiagOpt
Definition: AnalyzerOptions.h:212
clang::CXXInlineableMemberKind
CXXInlineableMemberKind
Describes the different kinds of C++ member functions which can be considered for inlining by the ana...
Definition: AnalyzerOptions.h:85
clang::PD_NONE
@ PD_NONE
Definition: AnalyzerOptions.h:62
clang::CTUPhase1InliningKind::All
@ All
clang::AnalyzerOptions::ShowCheckerHelp
unsigned ShowCheckerHelp
Definition: AnalyzerOptions.h:234
PathDiagnostic.h
clang::AnalyzerOptions::getCheckerIntegerOption
int getCheckerIntegerOption(StringRef CheckerName, StringRef OptionName, bool SearchInParents=false) const
Interprets an option's string value as an integer value.
Definition: AnalyzerOptions.cpp:186
clang::NumStores
@ NumStores
Definition: AnalyzerOptions.h:47
clang::AnalysisConstraints
AnalysisConstraints
AnalysisConstraints - Set of available constraint models.
Definition: AnalyzerOptions.h:51
clang::AnalyzerOptions::eagerlyAssumeBinOpBifurcation
unsigned eagerlyAssumeBinOpBifurcation
Definition: AnalyzerOptions.h:249
clang::AnalyzerOptions::getRegisteredCheckers
static std::vector< StringRef > getRegisteredCheckers(bool IncludeExperimental=false)
Retrieves the list of checkers generated from Checkers.td.
Definition: AnalyzerOptions.h:432
clang::NUM_ANALYSIS_DIAG_CLIENTS
@ NUM_ANALYSIS_DIAG_CLIENTS
Definition: AnalyzerOptions.h:63
clang::AnalyzerOptions::ShowCheckerOptionList
unsigned ShowCheckerOptionList
Definition: AnalyzerOptions.h:238
clang::AnalyzerOptions::isUnknownAnalyzerConfig
bool isUnknownAnalyzerConfig(StringRef Name) const
Definition: AnalyzerOptions.h:296
clang::AnalyzerOptions::CheckersAndPackages
std::vector< std::pair< std::string, bool > > CheckersAndPackages
Pairs of checker/package name and enable/disable.
Definition: AnalyzerOptions.h:202
clang::ExplorationStrategyKind
ExplorationStrategyKind
Definition: AnalyzerOptions.h:123
clang::AnalyzerOptions::Config
ConfigTable Config
A key-value table of use-specified configuration values.
Definition: AnalyzerOptions.h:209
clang::IPAK_None
@ IPAK_None
Perform only intra-procedural analysis.
Definition: AnalyzerOptions.h:107
clang::AnalyzerOptions::getIPAMode
IPAKind getIPAMode() const
Returns the inter-procedural analysis mode.
Definition: AnalyzerOptions.cpp:95
clang::AnalyzerOptions::AnalyzeSpecificFunction
std::string AnalyzeSpecificFunction
Definition: AnalyzerOptions.h:215
clang::AnalysisInliningMode
AnalysisInliningMode
AnalysisInlineFunctionSelection - Set of inlining function selection heuristics.
Definition: AnalyzerOptions.h:74
clang::AnalyzerOptions::ShowCheckerHelpDeveloper
unsigned ShowCheckerHelpDeveloper
Definition: AnalyzerOptions.h:236
clang::AnalyzerOptions::printFormattedEntry
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.
Definition: AnalyzerOptions.cpp:33
clang::NumInliningModes
@ NumInliningModes
Definition: AnalyzerOptions.h:77
false
#define false
Definition: stdbool.h:22
clang::AnalyzerOptions::UnoptimizedCFG
unsigned UnoptimizedCFG
Definition: AnalyzerOptions.h:253
clang::AnalyzerOptions::getDiagOpts
ento::PathDiagnosticConsumerOptions getDiagOpts() const
Definition: AnalyzerOptions.h:397
clang::ExplorationStrategyKind::BFSBlockDFSContents
@ BFSBlockDFSContents
clang::ento::CheckerBase
Definition: Checker.h:492
clang::AnalyzerOptions::DumpExplodedGraphTo
std::string DumpExplodedGraphTo
File path to which the exploded graph should be dumped.
Definition: AnalyzerOptions.h:218
LLVM.h
clang::AnalyzerOptions
Stores options for the analyzer from the command line.
Definition: AnalyzerOptions.h:165
clang::NumPurgeModes
@ NumPurgeModes
Definition: AnalyzerOptions.h:70
clang::AnalyzerOptions::ShowConfigOptionsList
unsigned ShowConfigOptionsList
Definition: AnalyzerOptions.h:243
clang::ExplorationStrategyKind::UnexploredFirstQueue
@ UnexploredFirstQueue
clang::CTUPhase1InliningKind
CTUPhase1InliningKind
Definition: AnalyzerOptions.h:141
clang::AnalyzerOptions::InlineMaxStackDepth
unsigned InlineMaxStackDepth
The inlining stack depth limit.
Definition: AnalyzerOptions.h:264
clang::ExplorationStrategyKind::UnexploredFirst
@ UnexploredFirst
clang::AnalyzerOptions::SilencedCheckersAndPackages
std::vector< std::string > SilencedCheckersAndPackages
Vector of checker/package names which will not emit warnings.
Definition: AnalyzerOptions.h:205
clang::AnalyzerOptions::ShouldEmitErrorsOnInvalidConfigValue
unsigned ShouldEmitErrorsOnInvalidConfigValue
Definition: AnalyzerOptions.h:244
clang::AnalyzerOptions::getCheckerBooleanOption
bool getCheckerBooleanOption(StringRef CheckerName, StringRef OptionName, bool SearchInParents=false) const
Interprets an option's string value as a boolean.
Definition: AnalyzerOptions.cpp:162
clang::AnalyzerOptions::NoRetryExhausted
unsigned NoRetryExhausted
Do not re-analyze paths leading to exhausted nodes with a different strategy.
Definition: AnalyzerOptions.h:258
clang::AnalyzerOptions::AnalyzerConfigCmdFlags
std::vector< llvm::StringLiteral > AnalyzerConfigCmdFlags
Definition: AnalyzerOptions.h:283
clang
Definition: CalledOnceCheck.h:17
clang::NumConstraints
@ NumConstraints
Definition: AnalyzerOptions.h:54
clang::AnalyzerOptions::FullCompilerInvocation
std::string FullCompilerInvocation
Store full compiler invocation for reproducible instructions in the generated report.
Definition: AnalyzerOptions.h:222
clang::CIMK_Destructors
@ CIMK_Destructors
Refers to destructors (implicit or explicit).
Definition: AnalyzerOptions.h:101
clang::CIMK_MemberFunctions
@ CIMK_MemberFunctions
Refers to regular member function and operator calls.
Definition: AnalyzerOptions.h:92
clang::NumAnalyses
@ NumAnalyses
Definition: AnalyzerOptions.h:40
clang::AnalyzerOptions::PrintStats
unsigned PrintStats
Definition: AnalyzerOptions.h:254
clang::IPAKind
IPAKind
Describes the different modes of inter-procedural analysis.
Definition: AnalyzerOptions.h:105
clang::AnalysisStores
AnalysisStores
AnalysisStores - Set of available analysis store models.
Definition: AnalyzerOptions.h:44
clang::AnalyzerOptions::visualizeExplodedGraphWithGraphViz
unsigned visualizeExplodedGraphWithGraphViz
Definition: AnalyzerOptions.h:252
clang::AnalysisPurgeMode
AnalysisPurgeMode
AnalysisPurgeModes - Set of available strategies for dead symbol removal.
Definition: AnalyzerOptions.h:67
clang::Analyses
Analyses
Analysis - Set of available source code analyses.
Definition: AnalyzerOptions.h:37
clang::UserModeKind
UserModeKind
Describes the kinds for high-level analyzer mode.
Definition: AnalyzerOptions.h:133
clang::UMK_Deep
@ UMK_Deep
Perform deep analyzes.
Definition: AnalyzerOptions.h:138
clang::AnalyzerOptions::ShowCheckerOptionAlphaList
unsigned ShowCheckerOptionAlphaList
Definition: AnalyzerOptions.h:239
clang::AnalyzerOptions::TrimGraph
unsigned TrimGraph
Definition: AnalyzerOptions.h:251
llvm::IntrusiveRefCntPtr< AnalyzerOptions >
clang::AnalyzerOptions::AnalyzeAll
unsigned AnalyzeAll
Definition: AnalyzerOptions.h:245