clang  14.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 
141 /// Stores options for the analyzer from the command line.
142 ///
143 /// Some options are frontend flags (e.g.: -analyzer-output), but some are
144 /// analyzer configuration options, which are preceded by -analyzer-config
145 /// (e.g.: -analyzer-config notes-as-events=true).
146 ///
147 /// If you'd like to add a new frontend flag, add it to
148 /// include/clang/Driver/CC1Options.td, add a new field to store the value of
149 /// that flag in this class, and initialize it in
150 /// lib/Frontend/CompilerInvocation.cpp.
151 ///
152 /// If you'd like to add a new non-checker configuration, register it in
153 /// include/clang/StaticAnalyzer/Core/AnalyzerOptions.def, and refer to the
154 /// top of the file for documentation.
155 ///
156 /// If you'd like to add a new checker option, call getChecker*Option()
157 /// whenever.
158 ///
159 /// Some of the options are controlled by raw frontend flags for no good reason,
160 /// and should be eventually converted into -analyzer-config flags. New analyzer
161 /// options should not be implemented as frontend flags. Frontend flags still
162 /// make sense for things that do not affect the actual analysis.
163 class AnalyzerOptions : public RefCountedBase<AnalyzerOptions> {
164 public:
165  using ConfigTable = llvm::StringMap<std::string>;
166 
167  /// Retrieves the list of checkers generated from Checkers.td. This doesn't
168  /// contain statically linked but non-generated checkers and plugin checkers!
169  static std::vector<StringRef>
170  getRegisteredCheckers(bool IncludeExperimental = false);
171 
172  /// Retrieves the list of packages generated from Checkers.td. This doesn't
173  /// contain statically linked but non-generated packages and plugin packages!
174  static std::vector<StringRef>
175  getRegisteredPackages(bool IncludeExperimental = false);
176 
177  /// Convenience function for printing options or checkers and their
178  /// description in a formatted manner. If \p MinLineWidth is set to 0, no line
179  /// breaks are introduced for the description.
180  ///
181  /// Format, depending whether the option name's length is less than
182  /// \p EntryWidth:
183  ///
184  /// <padding>EntryName<padding>Description
185  /// <---------padding--------->Description
186  /// <---------padding--------->Description
187  ///
188  /// <padding>VeryVeryLongEntryName
189  /// <---------padding--------->Description
190  /// <---------padding--------->Description
191  /// ^~~~~~~~~InitialPad
192  /// ^~~~~~~~~~~~~~~~~~EntryWidth
193  /// ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~MinLineWidth
194  static void printFormattedEntry(llvm::raw_ostream &Out,
195  std::pair<StringRef, StringRef> EntryDescPair,
196  size_t InitialPad, size_t EntryWidth,
197  size_t MinLineWidth = 0);
198 
199  /// Pairs of checker/package name and enable/disable.
200  std::vector<std::pair<std::string, bool>> CheckersAndPackages;
201 
202  /// Vector of checker/package names which will not emit warnings.
203  std::vector<std::string> SilencedCheckersAndPackages;
204 
205  /// A key-value table of use-specified configuration values.
206  // TODO: This shouldn't be public.
208  AnalysisStores AnalysisStoreOpt = RegionStoreModel;
212 
214 
215  /// File path to which the exploded graph should be dumped.
217 
218  /// Store full compiler invocation for reproducible instructions in the
219  /// generated report.
221 
222  /// The maximum number of times the analyzer visits a block.
224 
225  /// Disable all analyzer checkers.
226  ///
227  /// This flag allows one to disable analyzer checkers on the code processed by
228  /// the given analysis consumer. Note, the code will get parsed and the
229  /// command-line options will get checked.
230  unsigned DisableAllCheckers : 1;
231 
232  unsigned ShowCheckerHelp : 1;
233  unsigned ShowCheckerHelpAlpha : 1;
235 
236  unsigned ShowCheckerOptionList : 1;
239 
241  unsigned ShowConfigOptionsList : 1;
243  unsigned AnalyzeAll : 1;
245  unsigned AnalyzeNestedBlocks : 1;
246 
248 
249  unsigned TrimGraph : 1;
251  unsigned UnoptimizedCFG : 1;
252  unsigned PrintStats : 1;
253 
254  /// Do not re-analyze paths leading to exhausted nodes with a different
255  /// strategy. We get better code coverage when retry is enabled.
256  unsigned NoRetryExhausted : 1;
257 
258  /// Emit analyzer warnings as errors.
259  bool AnalyzerWerror : 1;
260 
261  /// The inlining stack depth limit.
263 
264  /// The mode of function selection used during inlining.
266 
267  // Create a field for each -analyzer-config option.
268 #define ANALYZER_OPTION_DEPENDS_ON_USER_MODE(TYPE, NAME, CMDFLAG, DESC, \
269  SHALLOW_VAL, DEEP_VAL) \
270  ANALYZER_OPTION(TYPE, NAME, CMDFLAG, DESC, SHALLOW_VAL)
271 
272 #define ANALYZER_OPTION(TYPE, NAME, CMDFLAG, DESC, DEFAULT_VAL) \
273  TYPE NAME;
274 
275 #include "clang/StaticAnalyzer/Core/AnalyzerOptions.def"
276 #undef ANALYZER_OPTION
277 #undef ANALYZER_OPTION_DEPENDS_ON_USER_MODE
278 
279  // Create an array of all -analyzer-config command line options. Sort it in
280  // the constructor.
281  std::vector<llvm::StringLiteral> AnalyzerConfigCmdFlags = {
282 #define ANALYZER_OPTION_DEPENDS_ON_USER_MODE(TYPE, NAME, CMDFLAG, DESC, \
283  SHALLOW_VAL, DEEP_VAL) \
284  ANALYZER_OPTION(TYPE, NAME, CMDFLAG, DESC, SHALLOW_VAL)
285 
286 #define ANALYZER_OPTION(TYPE, NAME, CMDFLAG, DESC, DEFAULT_VAL) \
287  llvm::StringLiteral(CMDFLAG),
288 
289 #include "clang/StaticAnalyzer/Core/AnalyzerOptions.def"
290 #undef ANALYZER_OPTION
291 #undef ANALYZER_OPTION_DEPENDS_ON_USER_MODE
292  };
293 
294  bool isUnknownAnalyzerConfig(StringRef Name) const {
295  assert(llvm::is_sorted(AnalyzerConfigCmdFlags));
296 
297  return !std::binary_search(AnalyzerConfigCmdFlags.begin(),
298  AnalyzerConfigCmdFlags.end(), Name);
299  }
300 
311  llvm::sort(AnalyzerConfigCmdFlags);
312  }
313 
314  /// Interprets an option's string value as a boolean. The "true" string is
315  /// interpreted as true and the "false" string is interpreted as false.
316  ///
317  /// If an option value is not provided, returns the given \p DefaultVal.
318  /// @param [in] CheckerName The *full name* of the checker. One may retrieve
319  /// this from the checker object's field \c Name, or through \c
320  /// CheckerManager::getCurrentCheckerName within the checker's registry
321  /// function.
322  /// Checker options are retrieved in the following format:
323  /// `-analyzer-config CheckerName:OptionName=Value.
324  /// @param [in] OptionName Name for option to retrieve.
325  /// @param [in] SearchInParents If set to true and the searched option was not
326  /// specified for the given checker the options for the parent packages will
327  /// be searched as well. The inner packages take precedence over the outer
328  /// ones.
329  bool getCheckerBooleanOption(StringRef CheckerName, StringRef OptionName,
330  bool SearchInParents = false) const;
331 
332  bool getCheckerBooleanOption(const ento::CheckerBase *C, StringRef OptionName,
333  bool SearchInParents = false) const;
334 
335  /// Interprets an option's string value as an integer value.
336  ///
337  /// If an option value is not provided, returns the given \p DefaultVal.
338  /// @param [in] CheckerName The *full name* of the checker. One may retrieve
339  /// this from the checker object's field \c Name, or through \c
340  /// CheckerManager::getCurrentCheckerName within the checker's registry
341  /// function.
342  /// Checker options are retrieved in the following format:
343  /// `-analyzer-config CheckerName:OptionName=Value.
344  /// @param [in] OptionName Name for option to retrieve.
345  /// @param [in] SearchInParents If set to true and the searched option was not
346  /// specified for the given checker the options for the parent packages will
347  /// be searched as well. The inner packages take precedence over the outer
348  /// ones.
349  int getCheckerIntegerOption(StringRef CheckerName, StringRef OptionName,
350  bool SearchInParents = false) const;
351 
352  int getCheckerIntegerOption(const ento::CheckerBase *C, StringRef OptionName,
353  bool SearchInParents = false) const;
354 
355  /// Query an option's string value.
356  ///
357  /// If an option value is not provided, returns the given \p DefaultVal.
358  /// @param [in] CheckerName The *full name* of the checker. One may retrieve
359  /// this from the checker object's field \c Name, or through \c
360  /// CheckerManager::getCurrentCheckerName within the checker's registry
361  /// function.
362  /// Checker options are retrieved in the following format:
363  /// `-analyzer-config CheckerName:OptionName=Value.
364  /// @param [in] OptionName Name for option to retrieve.
365  /// @param [in] SearchInParents If set to true and the searched option was not
366  /// specified for the given checker the options for the parent packages will
367  /// be searched as well. The inner packages take precedence over the outer
368  /// ones.
369  StringRef getCheckerStringOption(StringRef CheckerName, StringRef OptionName,
370  bool SearchInParents = false) const;
371 
372  StringRef getCheckerStringOption(const ento::CheckerBase *C,
373  StringRef OptionName,
374  bool SearchInParents = false) const;
375 
376  /// Retrieves and sets the UserMode. This is a high-level option,
377  /// which is used to set other low-level options. It is not accessible
378  /// outside of AnalyzerOptions.
379  UserModeKind getUserMode() const;
380 
382 
383  /// Returns the inter-procedural analysis mode.
384  IPAKind getIPAMode() const;
385 
386  /// Returns the option controlling which C++ member functions will be
387  /// considered for inlining.
388  ///
389  /// This is controlled by the 'c++-inlining' config option.
390  ///
391  /// \sa CXXMemberInliningMode
393 
395  return {FullCompilerInvocation,
396  ShouldDisplayMacroExpansions,
397  ShouldSerializeStats,
398  // The stable report filename option is deprecated because
399  // file names are now always stable. Now the old option acts as
400  // an alias to the new verbose filename option because this
401  // closely mimics the behavior under the old option.
402  ShouldWriteStableReportFilename || ShouldWriteVerboseReportFilename,
404  ShouldApplyFixIts,
405  ShouldDisplayCheckerNameForText};
406  }
407 };
408 
410 
411 //===----------------------------------------------------------------------===//
412 // We'll use AnalyzerOptions in the frontend, but we can't link the frontend
413 // with clangStaticAnalyzerCore, because clangStaticAnalyzerCore depends on
414 // clangFrontend.
415 //
416 // For this reason, implement some methods in this header file.
417 //===----------------------------------------------------------------------===//
418 
420  auto K = llvm::StringSwitch<llvm::Optional<UserModeKind>>(UserMode)
421  .Case("shallow", UMK_Shallow)
422  .Case("deep", UMK_Deep)
423  .Default(None);
424  assert(K.hasValue() && "User mode is invalid.");
425  return K.getValue();
426 }
427 
428 inline std::vector<StringRef>
429 AnalyzerOptions::getRegisteredCheckers(bool IncludeExperimental) {
430  static constexpr llvm::StringLiteral StaticAnalyzerCheckerNames[] = {
431 #define GET_CHECKERS
432 #define CHECKER(FULLNAME, CLASS, HELPTEXT, DOC_URI, IS_HIDDEN) \
433  llvm::StringLiteral(FULLNAME),
434 #include "clang/StaticAnalyzer/Checkers/Checkers.inc"
435 #undef CHECKER
436 #undef GET_CHECKERS
437  };
438  std::vector<StringRef> Checkers;
439  for (StringRef CheckerName : StaticAnalyzerCheckerNames) {
440  if (!CheckerName.startswith("debug.") &&
441  (IncludeExperimental || !CheckerName.startswith("alpha.")))
442  Checkers.push_back(CheckerName);
443  }
444  return Checkers;
445 }
446 
447 inline std::vector<StringRef>
448 AnalyzerOptions::getRegisteredPackages(bool IncludeExperimental) {
449  static constexpr llvm::StringLiteral StaticAnalyzerPackageNames[] = {
450 #define GET_PACKAGES
451 #define PACKAGE(FULLNAME) llvm::StringLiteral(FULLNAME),
452 #include "clang/StaticAnalyzer/Checkers/Checkers.inc"
453 #undef PACKAGE
454 #undef GET_PACKAGES
455  };
456  std::vector<StringRef> Packages;
457  for (StringRef PackageName : StaticAnalyzerPackageNames) {
458  if (PackageName != "debug" &&
459  (IncludeExperimental || PackageName != "alpha"))
460  Packages.push_back(PackageName);
461  }
462  return Packages;
463 }
464 
465 } // namespace clang
466 
467 #endif // LLVM_CLANG_STATICANALYZER_CORE_ANALYZEROPTIONS_H
clang::ento::PathDiagnosticConsumerOptions
These options tweak the behavior of path diangostic consumers.
Definition: PathDiagnostic.h:63
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:238
clang::AnalyzerOptions::getRegisteredPackages
static std::vector< StringRef > getRegisteredPackages(bool IncludeExperimental=false)
Retrieves the list of packages generated from Checkers.td.
Definition: AnalyzerOptions.h:448
clang::AnalyzerOptions::maxBlockVisitOnPath
unsigned maxBlockVisitOnPath
The maximum number of times the analyzer visits a block.
Definition: AnalyzerOptions.h:223
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:209
clang::AnalyzerOptions::DisableAllCheckers
unsigned DisableAllCheckers
Disable all analyzer checkers.
Definition: AnalyzerOptions.h:230
clang::ExplorationStrategyKind::DFS
@ DFS
clang::AnalyzerOptions::AnalyzerWerror
bool AnalyzerWerror
Emit analyzer warnings as errors.
Definition: AnalyzerOptions.h:259
clang::AnalyzerOptions::getUserMode
UserModeKind getUserMode() const
Retrieves and sets the UserMode.
Definition: AnalyzerOptions.h:419
clang::ExplorationStrategyKind::UnexploredFirstLocationQueue
@ UnexploredFirstLocationQueue
clang::UMK_Shallow
@ UMK_Shallow
Perform shallow but fast analyzes.
Definition: AnalyzerOptions.h:135
clang::ExplorationStrategyKind::BFS
@ BFS
clang::AnalyzerOptions::AnalyzerOptions
AnalyzerOptions()
Definition: AnalyzerOptions.h:301
clang::AnalyzerOptions::AnalysisPurgeOpt
AnalysisPurgeMode AnalysisPurgeOpt
Definition: AnalyzerOptions.h:211
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:245
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:117
clang::AnalyzerOptions::ConfigTable
llvm::StringMap< std::string > ConfigTable
Definition: AnalyzerOptions.h:165
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:233
clang::AnalyzerOptions::mayInlineCXXMemberFunction
bool mayInlineCXXMemberFunction(CXXInlineableMemberKind K) const
Returns the option controlling which C++ member functions will be considered for inlining.
Definition: AnalyzerOptions.cpp:98
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:244
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:208
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:265
clang::AnalyzerOptions::ShowEnabledCheckerList
unsigned ShowEnabledCheckerList
Definition: AnalyzerOptions.h:240
clang::AnalyzerOptions::AnalysisDiagOpt
AnalysisDiagClients AnalysisDiagOpt
Definition: AnalyzerOptions.h:210
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::AnalyzerOptions::ShowCheckerHelp
unsigned ShowCheckerHelp
Definition: AnalyzerOptions.h:232
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:175
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:247
clang::AnalyzerOptions::getRegisteredCheckers
static std::vector< StringRef > getRegisteredCheckers(bool IncludeExperimental=false)
Retrieves the list of checkers generated from Checkers.td.
Definition: AnalyzerOptions.h:429
clang::NUM_ANALYSIS_DIAG_CLIENTS
@ NUM_ANALYSIS_DIAG_CLIENTS
Definition: AnalyzerOptions.h:63
clang::AnalyzerOptions::ShowCheckerOptionList
unsigned ShowCheckerOptionList
Definition: AnalyzerOptions.h:236
clang::AnalyzerOptions::isUnknownAnalyzerConfig
bool isUnknownAnalyzerConfig(StringRef Name) const
Definition: AnalyzerOptions.h:294
clang::AnalyzerOptions::CheckersAndPackages
std::vector< std::pair< std::string, bool > > CheckersAndPackages
Pairs of checker/package name and enable/disable.
Definition: AnalyzerOptions.h:200
clang::ExplorationStrategyKind
ExplorationStrategyKind
Definition: AnalyzerOptions.h:123
clang::AnalyzerOptions::Config
ConfigTable Config
A key-value table of use-specified configuration values.
Definition: AnalyzerOptions.h:207
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:84
clang::AnalyzerOptions::AnalyzeSpecificFunction
std::string AnalyzeSpecificFunction
Definition: AnalyzerOptions.h:213
clang::AnalysisInliningMode
AnalysisInliningMode
AnalysisInlineFunctionSelection - Set of inlining function selection heuristics.
Definition: AnalyzerOptions.h:74
clang::AnalyzerOptions::ShowCheckerHelpDeveloper
unsigned ShowCheckerHelpDeveloper
Definition: AnalyzerOptions.h:234
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:17
clang::AnalyzerOptions::UnoptimizedCFG
unsigned UnoptimizedCFG
Definition: AnalyzerOptions.h:251
clang::AnalyzerOptions::getDiagOpts
ento::PathDiagnosticConsumerOptions getDiagOpts() const
Definition: AnalyzerOptions.h:394
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:216
LLVM.h
clang::AnalyzerOptions
Stores options for the analyzer from the command line.
Definition: AnalyzerOptions.h:163
clang::NumPurgeModes
@ NumPurgeModes
Definition: AnalyzerOptions.h:70
clang::AnalyzerOptions::ShowConfigOptionsList
unsigned ShowConfigOptionsList
Definition: AnalyzerOptions.h:241
clang::ExplorationStrategyKind::UnexploredFirstQueue
@ UnexploredFirstQueue
clang::AnalyzerOptions::InlineMaxStackDepth
unsigned InlineMaxStackDepth
The inlining stack depth limit.
Definition: AnalyzerOptions.h:262
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:203
clang::AnalyzerOptions::ShouldEmitErrorsOnInvalidConfigValue
unsigned ShouldEmitErrorsOnInvalidConfigValue
Definition: AnalyzerOptions.h:242
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:151
clang::AnalyzerOptions::NoRetryExhausted
unsigned NoRetryExhausted
Do not re-analyze paths leading to exhausted nodes with a different strategy.
Definition: AnalyzerOptions.h:256
clang::AnalyzerOptions::AnalyzerConfigCmdFlags
std::vector< llvm::StringLiteral > AnalyzerConfigCmdFlags
Definition: AnalyzerOptions.h:281
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:220
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:252
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:250
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:237
clang::AnalyzerOptions::TrimGraph
unsigned TrimGraph
Definition: AnalyzerOptions.h:249
llvm::IntrusiveRefCntPtr< AnalyzerOptions >
clang::AnalyzerOptions::AnalyzeAll
unsigned AnalyzeAll
Definition: AnalyzerOptions.h:243