clang  5.0.0
AnalyzerOptions.h
Go to the documentation of this file.
1 //===--- AnalyzerOptions.h - Analysis Engine Options ------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This header defines various options for the static analyzer that are set
11 // by the frontend and are consulted throughout the analyzer.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_CLANG_STATICANALYZER_CORE_ANALYZEROPTIONS_H
16 #define LLVM_CLANG_STATICANALYZER_CORE_ANALYZEROPTIONS_H
17 
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 <string>
23 #include <vector>
24 
25 namespace clang {
26 class ASTConsumer;
27 class DiagnosticsEngine;
28 class Preprocessor;
29 class LangOptions;
30 
31 namespace ento {
32 class CheckerBase;
33 }
34 
35 /// Analysis - Set of available source code analyses.
36 enum Analyses {
37 #define ANALYSIS(NAME, CMDFLAG, DESC, SCOPE) NAME,
38 #include "clang/StaticAnalyzer/Core/Analyses.def"
40 };
41 
42 /// AnalysisStores - Set of available analysis store models.
44 #define ANALYSIS_STORE(NAME, CMDFLAG, DESC, CREATFN) NAME##Model,
45 #include "clang/StaticAnalyzer/Core/Analyses.def"
47 };
48 
49 /// AnalysisConstraints - Set of available constraint models.
51 #define ANALYSIS_CONSTRAINTS(NAME, CMDFLAG, DESC, CREATFN) NAME##Model,
52 #include "clang/StaticAnalyzer/Core/Analyses.def"
54 };
55 
56 /// AnalysisDiagClients - Set of available diagnostic clients for rendering
57 /// analysis results.
59 #define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATFN) PD_##NAME,
60 #include "clang/StaticAnalyzer/Core/Analyses.def"
63 };
64 
65 /// AnalysisPurgeModes - Set of available strategies for dead symbol removal.
67 #define ANALYSIS_PURGE(NAME, CMDFLAG, DESC) NAME,
68 #include "clang/StaticAnalyzer/Core/Analyses.def"
70 };
71 
72 /// AnalysisInlineFunctionSelection - Set of inlining function selection heuristics.
74 #define ANALYSIS_INLINING_MODE(NAME, CMDFLAG, DESC) NAME,
75 #include "clang/StaticAnalyzer/Core/Analyses.def"
77 };
78 
79 /// \brief Describes the different kinds of C++ member functions which can be
80 /// considered for inlining by the analyzer.
81 ///
82 /// These options are cumulative; enabling one kind of member function will
83 /// enable all kinds with lower enum values.
85  // Uninitialized = 0,
86 
87  /// A dummy mode in which no C++ inlining is enabled.
88  CIMK_None = 1,
89 
90  /// Refers to regular member function and operator calls.
92 
93  /// Refers to constructors (implicit or explicit).
94  ///
95  /// Note that a constructor will not be inlined if the corresponding
96  /// destructor is non-trivial.
98 
99  /// Refers to destructors (implicit or explicit).
101 };
102 
103 /// \brief Describes the different modes of inter-procedural analysis.
104 enum IPAKind {
106 
107  /// Perform only intra-procedural analysis.
109 
110  /// Inline C functions and blocks when their definitions are available.
112 
113  /// Inline callees(C, C++, ObjC) when their definitions are available.
115 
116  /// Enable inlining of dynamically dispatched methods.
118 
119  /// Enable inlining of dynamically dispatched methods, bifurcate paths when
120  /// exact type info is unavailable.
122 };
123 
124 class AnalyzerOptions : public RefCountedBase<AnalyzerOptions> {
125 public:
126  typedef llvm::StringMap<std::string> ConfigTable;
127 
128  static std::vector<StringRef>
129  getRegisteredCheckers(bool IncludeExperimental = false);
130 
131  /// \brief Pair of checker name and enable/disable.
132  std::vector<std::pair<std::string, bool> > CheckersControlList;
133 
134  /// \brief A key-value table of use-specified configuration values.
140 
142 
143  /// \brief The maximum number of times the analyzer visits a block.
145 
146 
147  /// \brief Disable all analyzer checks.
148  ///
149  /// This flag allows one to disable analyzer checks on the code processed by
150  /// the given analysis consumer. Note, the code will get parsed and the
151  /// command-line options will get checked.
152  unsigned DisableAllChecks : 1;
153 
154  unsigned ShowCheckerHelp : 1;
156  unsigned AnalyzeAll : 1;
158  unsigned AnalyzeNestedBlocks : 1;
159 
160  /// \brief The flag regulates if we should eagerly assume evaluations of
161  /// conditionals, thus, bifurcating the path.
162  ///
163  /// This flag indicates how the engine should handle expressions such as: 'x =
164  /// (y != 0)'. When this flag is true then the subexpression 'y != 0' will be
165  /// eagerly assumed to be true or false, thus evaluating it to the integers 0
166  /// or 1 respectively. The upside is that this can increase analysis
167  /// precision until we have a better way to lazily evaluate such logic. The
168  /// downside is that it eagerly bifurcates paths.
170 
171  unsigned TrimGraph : 1;
174  unsigned UnoptimizedCFG : 1;
175  unsigned PrintStats : 1;
176 
177  /// \brief Do not re-analyze paths leading to exhausted nodes with a different
178  /// strategy. We get better code coverage when retry is enabled.
179  unsigned NoRetryExhausted : 1;
180 
181  /// \brief The inlining stack depth limit.
183 
184  /// \brief The mode of function selection used during inlining.
186 
187 private:
188  /// \brief Describes the kinds for high-level analyzer mode.
189  enum UserModeKind {
190  UMK_NotSet = 0,
191  /// Perform shallow but fast analyzes.
192  UMK_Shallow = 1,
193  /// Perform deep analyzes.
194  UMK_Deep = 2
195  };
196 
197  /// Controls the high-level analyzer mode, which influences the default
198  /// settings for some of the lower-level config options (such as IPAMode).
199  /// \sa getUserMode
200  UserModeKind UserMode;
201 
202  /// Controls the mode of inter-procedural analysis.
203  IPAKind IPAMode;
204 
205  /// Controls which C++ member functions will be considered for inlining.
206  CXXInlineableMemberKind CXXMemberInliningMode;
207 
208  /// \sa includeImplicitDtorsInCFG
209  Optional<bool> IncludeImplicitDtorsInCFG;
210 
211  /// \sa includeTemporaryDtorsInCFG
212  Optional<bool> IncludeTemporaryDtorsInCFG;
213 
214  /// \sa IncludeLifetimeInCFG
215  Optional<bool> IncludeLifetimeInCFG;
216 
217  /// \sa mayInlineCXXStandardLibrary
218  Optional<bool> InlineCXXStandardLibrary;
219 
220  /// \sa mayInlineTemplateFunctions
221  Optional<bool> InlineTemplateFunctions;
222 
223  /// \sa mayInlineCXXAllocator
224  Optional<bool> InlineCXXAllocator;
225 
226  /// \sa mayInlineCXXContainerMethods
227  Optional<bool> InlineCXXContainerMethods;
228 
229  /// \sa mayInlineCXXSharedPtrDtor
230  Optional<bool> InlineCXXSharedPtrDtor;
231 
232  /// \sa mayInlineObjCMethod
233  Optional<bool> ObjCInliningMode;
234 
235  // Cache of the "ipa-always-inline-size" setting.
236  // \sa getAlwaysInlineSize
237  Optional<unsigned> AlwaysInlineSize;
238 
239  /// \sa shouldSuppressNullReturnPaths
240  Optional<bool> SuppressNullReturnPaths;
241 
242  // \sa getMaxInlinableSize
243  Optional<unsigned> MaxInlinableSize;
244 
245  /// \sa shouldAvoidSuppressingNullArgumentPaths
246  Optional<bool> AvoidSuppressingNullArgumentPaths;
247 
248  /// \sa shouldSuppressInlinedDefensiveChecks
249  Optional<bool> SuppressInlinedDefensiveChecks;
250 
251  /// \sa shouldSuppressFromCXXStandardLibrary
252  Optional<bool> SuppressFromCXXStandardLibrary;
253 
254  /// \sa reportIssuesInMainSourceFile
255  Optional<bool> ReportIssuesInMainSourceFile;
256 
257  /// \sa StableReportFilename
258  Optional<bool> StableReportFilename;
259 
260  /// \sa getGraphTrimInterval
261  Optional<unsigned> GraphTrimInterval;
262 
263  /// \sa getMaxTimesInlineLarge
264  Optional<unsigned> MaxTimesInlineLarge;
265 
266  /// \sa getMinCFGSizeTreatFunctionsAsLarge
267  Optional<unsigned> MinCFGSizeTreatFunctionsAsLarge;
268 
269  /// \sa getMaxNodesPerTopLevelFunction
270  Optional<unsigned> MaxNodesPerTopLevelFunction;
271 
272  /// \sa shouldInlineLambdas
273  Optional<bool> InlineLambdas;
274 
275  /// \sa shouldWidenLoops
276  Optional<bool> WidenLoops;
277 
278  /// \sa shouldDisplayNotesAsEvents
279  Optional<bool> DisplayNotesAsEvents;
280 
281  /// A helper function that retrieves option for a given full-qualified
282  /// checker name.
283  /// Options for checkers can be specified via 'analyzer-config' command-line
284  /// option.
285  /// Example:
286  /// @code-analyzer-config unix.Malloc:OptionName=CheckerOptionValue @endcode
287  /// or @code-analyzer-config unix:OptionName=GroupOptionValue @endcode
288  /// for groups of checkers.
289  /// @param [in] CheckerName Full-qualified checker name, like
290  /// alpha.unix.StreamChecker.
291  /// @param [in] OptionName Name of the option to get.
292  /// @param [in] Default Default value if no option is specified.
293  /// @param [in] SearchInParents If set to true and the searched option was not
294  /// specified for the given checker the options for the parent packages will
295  /// be searched as well. The inner packages take precedence over the outer
296  /// ones.
297  /// @retval CheckerOptionValue An option for a checker if it was specified.
298  /// @retval GroupOptionValue An option for group if it was specified and no
299  /// checker-specific options were found. The closer group to checker,
300  /// the more priority it has. For example, @c coregroup.subgroup has more
301  /// priority than @c coregroup for @c coregroup.subgroup.CheckerName checker.
302  /// @retval Default If nor checker option, nor group option was found.
303  StringRef getCheckerOption(StringRef CheckerName, StringRef OptionName,
304  StringRef Default,
305  bool SearchInParents = false);
306 
307 public:
308  /// Interprets an option's string value as a boolean. The "true" string is
309  /// interpreted as true and the "false" string is interpreted as false.
310  ///
311  /// If an option value is not provided, returns the given \p DefaultVal.
312  /// @param [in] Name Name for option to retrieve.
313  /// @param [in] DefaultVal Default value returned if no such option was
314  /// specified.
315  /// @param [in] C The optional checker parameter that can be used to restrict
316  /// the search to the options of this particular checker (and its parents
317  /// dependening on search mode).
318  /// @param [in] SearchInParents If set to true and the searched option was not
319  /// specified for the given checker the options for the parent packages will
320  /// be searched as well. The inner packages take precedence over the outer
321  /// ones.
322  bool getBooleanOption(StringRef Name, bool DefaultVal,
323  const ento::CheckerBase *C = nullptr,
324  bool SearchInParents = false);
325 
326  /// Variant that accepts a Optional value to cache the result.
327  ///
328  /// @param [in,out] V Return value storage, returned if parameter contains
329  /// an existing valid option, else it is used to store a return value
330  /// @param [in] Name Name for option to retrieve.
331  /// @param [in] DefaultVal Default value returned if no such option was
332  /// specified.
333  /// @param [in] C The optional checker parameter that can be used to restrict
334  /// the search to the options of this particular checker (and its parents
335  /// dependening on search mode).
336  /// @param [in] SearchInParents If set to true and the searched option was not
337  /// specified for the given checker the options for the parent packages will
338  /// be searched as well. The inner packages take precedence over the outer
339  /// ones.
340  bool getBooleanOption(Optional<bool> &V, StringRef Name, bool DefaultVal,
341  const ento::CheckerBase *C = nullptr,
342  bool SearchInParents = false);
343 
344  /// Interprets an option's string value as an integer value.
345  ///
346  /// If an option value is not provided, returns the given \p DefaultVal.
347  /// @param [in] Name Name for option to retrieve.
348  /// @param [in] DefaultVal Default value returned if no such option was
349  /// specified.
350  /// @param [in] C The optional checker parameter that can be used to restrict
351  /// the search to the options of this particular checker (and its parents
352  /// dependening on search mode).
353  /// @param [in] SearchInParents If set to true and the searched option was not
354  /// specified for the given checker the options for the parent packages will
355  /// be searched as well. The inner packages take precedence over the outer
356  /// ones.
357  int getOptionAsInteger(StringRef Name, int DefaultVal,
358  const ento::CheckerBase *C = nullptr,
359  bool SearchInParents = false);
360 
361  /// Query an option's string value.
362  ///
363  /// If an option value is not provided, returns the given \p DefaultVal.
364  /// @param [in] Name Name for option to retrieve.
365  /// @param [in] DefaultVal Default value returned if no such option was
366  /// specified.
367  /// @param [in] C The optional checker parameter that can be used to restrict
368  /// the search to the options of this particular checker (and its parents
369  /// dependening on search mode).
370  /// @param [in] SearchInParents If set to true and the searched option was not
371  /// specified for the given checker the options for the parent packages will
372  /// be searched as well. The inner packages take precedence over the outer
373  /// ones.
374  StringRef getOptionAsString(StringRef Name, StringRef DefaultVal,
375  const ento::CheckerBase *C = nullptr,
376  bool SearchInParents = false);
377 
378  /// \brief 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();
382 
383  /// \brief Returns the inter-procedural analysis mode.
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 
394  /// Returns true if ObjectiveC inlining is enabled, false otherwise.
395  bool mayInlineObjCMethod();
396 
397  /// Returns whether or not the destructors for C++ temporary objects should
398  /// be included in the CFG.
399  ///
400  /// This is controlled by the 'cfg-temporary-dtors' config option, which
401  /// accepts the values "true" and "false".
403 
404  /// Returns whether or not implicit destructors for C++ objects should
405  /// be included in the CFG.
406  ///
407  /// This is controlled by the 'cfg-implicit-dtors' config option, which
408  /// accepts the values "true" and "false".
410 
411  /// Returns whether or not end-of-lifetime information should be included in
412  /// the CFG.
413  ///
414  /// This is controlled by the 'cfg-lifetime' config option, which accepts
415  /// the values "true" and "false".
416  bool includeLifetimeInCFG();
417 
418  /// Returns whether or not C++ standard library functions may be considered
419  /// for inlining.
420  ///
421  /// This is controlled by the 'c++-stdlib-inlining' config option, which
422  /// accepts the values "true" and "false".
424 
425  /// Returns whether or not templated functions may be considered for inlining.
426  ///
427  /// This is controlled by the 'c++-template-inlining' config option, which
428  /// accepts the values "true" and "false".
430 
431  /// Returns whether or not allocator call may be considered for inlining.
432  ///
433  /// This is controlled by the 'c++-allocator-inlining' config option, which
434  /// accepts the values "true" and "false".
435  bool mayInlineCXXAllocator();
436 
437  /// Returns whether or not methods of C++ container objects may be considered
438  /// for inlining.
439  ///
440  /// This is controlled by the 'c++-container-inlining' config option, which
441  /// accepts the values "true" and "false".
443 
444  /// Returns whether or not the destructor of C++ 'shared_ptr' may be
445  /// considered for inlining.
446  ///
447  /// This covers std::shared_ptr, std::tr1::shared_ptr, and boost::shared_ptr,
448  /// and indeed any destructor named "~shared_ptr".
449  ///
450  /// This is controlled by the 'c++-shared_ptr-inlining' config option, which
451  /// accepts the values "true" and "false".
453 
454  /// Returns whether or not paths that go through null returns should be
455  /// suppressed.
456  ///
457  /// This is a heuristic for avoiding bug reports with paths that go through
458  /// inlined functions that are more defensive than their callers.
459  ///
460  /// This is controlled by the 'suppress-null-return-paths' config option,
461  /// which accepts the values "true" and "false".
463 
464  /// Returns whether a bug report should \em not be suppressed if its path
465  /// includes a call with a null argument, even if that call has a null return.
466  ///
467  /// This option has no effect when #shouldSuppressNullReturnPaths() is false.
468  ///
469  /// This is a counter-heuristic to avoid false negatives.
470  ///
471  /// This is controlled by the 'avoid-suppressing-null-argument-paths' config
472  /// option, which accepts the values "true" and "false".
474 
475  /// Returns whether or not diagnostics containing inlined defensive NULL
476  /// checks should be suppressed.
477  ///
478  /// This is controlled by the 'suppress-inlined-defensive-checks' config
479  /// option, which accepts the values "true" and "false".
481 
482  /// Returns whether or not diagnostics reported within the C++ standard
483  /// library should be suppressed.
484  ///
485  /// This is controlled by the 'suppress-c++-stdlib' config option,
486  /// which accepts the values "true" and "false".
488 
489  /// Returns whether or not the diagnostic report should be always reported
490  /// in the main source file and not the headers.
491  ///
492  /// This is controlled by the 'report-in-main-source-file' config option,
493  /// which accepts the values "true" and "false".
495 
496  /// Returns whether or not the report filename should be random or not.
497  ///
498  /// This is controlled by the 'stable-report-filename' config option,
499  /// which accepts the values "true" and "false". Default = false
501 
502  /// Returns whether irrelevant parts of a bug report path should be pruned
503  /// out of the final output.
504  ///
505  /// This is controlled by the 'prune-paths' config option, which accepts the
506  /// values "true" and "false".
507  bool shouldPrunePaths();
508 
509  /// Returns true if 'static' initializers should be in conditional logic
510  /// in the CFG.
512 
513  // Returns the size of the functions (in basic blocks), which should be
514  // considered to be small enough to always inline.
515  //
516  // This is controlled by "ipa-always-inline-size" analyzer-config option.
517  unsigned getAlwaysInlineSize();
518 
519  // Returns the bound on the number of basic blocks in an inlined function
520  // (50 by default).
521  //
522  // This is controlled by "-analyzer-config max-inlinable-size" option.
523  unsigned getMaxInlinableSize();
524 
525  /// Returns true if the analyzer engine should synthesize fake bodies
526  /// for well-known functions.
527  bool shouldSynthesizeBodies();
528 
529  /// Returns how often nodes in the ExplodedGraph should be recycled to save
530  /// memory.
531  ///
532  /// This is controlled by the 'graph-trim-interval' config option. To disable
533  /// node reclamation, set the option to "0".
534  unsigned getGraphTrimInterval();
535 
536  /// Returns the maximum times a large function could be inlined.
537  ///
538  /// This is controlled by the 'max-times-inline-large' config option.
539  unsigned getMaxTimesInlineLarge();
540 
541  /// Returns the number of basic blocks a function needs to have to be
542  /// considered large for the 'max-times-inline-large' config option.
543  ///
544  /// This is controlled by the 'min-cfg-size-treat-functions-as-large' config
545  /// option.
547 
548  /// Returns the maximum number of nodes the analyzer can generate while
549  /// exploring a top level function (for each exploded graph).
550  /// 150000 is default; 0 means no limit.
551  ///
552  /// This is controlled by the 'max-nodes' config option.
554 
555  /// Returns true if lambdas should be inlined. Otherwise a sink node will be
556  /// generated each time a LambdaExpr is visited.
557  bool shouldInlineLambdas();
558 
559  /// Returns true if the analysis should try to widen loops.
560  /// This is controlled by the 'widen-loops' config option.
561  bool shouldWidenLoops();
562 
563  /// Returns true if the bug reporter should transparently treat extra note
564  /// diagnostic pieces as event diagnostic pieces. Useful when the diagnostic
565  /// consumer doesn't support the extra note pieces.
566  ///
567  /// This is controlled by the 'extra-notes-as-events' option, which defaults
568  /// to false when unset.
570 
571 public:
573  AnalysisStoreOpt(RegionStoreModel),
574  AnalysisConstraintsOpt(RangeConstraintsModel),
575  AnalysisDiagOpt(PD_HTML),
576  AnalysisPurgeOpt(PurgeStmt),
577  DisableAllChecks(0),
578  ShowCheckerHelp(0),
580  AnalyzeAll(0),
584  TrimGraph(0),
587  UnoptimizedCFG(0),
588  PrintStats(0),
589  NoRetryExhausted(0),
590  // Cap the stack depth at 4 calls (5 stack frames, base + 4 calls).
592  InliningMode(NoRedundancy),
593  UserMode(UMK_NotSet),
594  IPAMode(IPAK_NotSet),
595  CXXMemberInliningMode() {}
596 
597 };
598 
600 
601 }
602 
603 #endif
Inline C functions and blocks when their definitions are available.
unsigned InlineMaxStackDepth
The inlining stack depth limit.
bool shouldDisplayNotesAsEvents()
Returns true if the bug reporter should transparently treat extra note diagnostic pieces as event dia...
IPAKind
Describes the different modes of inter-procedural analysis.
bool shouldSuppressNullReturnPaths()
Returns whether or not paths that go through null returns should be suppressed.
bool shouldPrunePaths()
Returns whether irrelevant parts of a bug report path should be pruned out of the final output...
unsigned visualizeExplodedGraphWithGraphViz
bool shouldAvoidSuppressingNullArgumentPaths()
Returns whether a bug report should not be suppressed if its path includes a call with a null argumen...
bool shouldWidenLoops()
Returns true if the analysis should try to widen loops.
Perform only intra-procedural analysis.
A dummy mode in which no C++ inlining is enabled.
bool mayInlineTemplateFunctions()
Returns whether or not templated functions may be considered for inlining.
Inline callees(C, C++, ObjC) when their definitions are available.
unsigned eagerlyAssumeBinOpBifurcation
The flag regulates if we should eagerly assume evaluations of conditionals, thus, bifurcating the pat...
StringRef getOptionAsString(StringRef Name, StringRef DefaultVal, const ento::CheckerBase *C=nullptr, bool SearchInParents=false)
Query an option's string value.
bool mayInlineCXXContainerMethods()
Returns whether or not methods of C++ container objects may be considered for inlining.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
static std::vector< StringRef > getRegisteredCheckers(bool IncludeExperimental=false)
bool includeLifetimeInCFG()
Returns whether or not end-of-lifetime information should be included in the CFG. ...
unsigned getMinCFGSizeTreatFunctionsAsLarge()
Returns the number of basic blocks a function needs to have to be considered large for the 'max-times...
std::vector< std::pair< std::string, bool > > CheckersControlList
Pair of checker name and enable/disable.
AnalysisStores
AnalysisStores - Set of available analysis store models.
UserModeKind getUserMode()
Retrieves and sets the UserMode.
bool shouldSuppressInlinedDefensiveChecks()
Returns whether or not diagnostics containing inlined defensive NULL checks should be suppressed...
AnalysisDiagClients AnalysisDiagOpt
AnalysisInliningMode InliningMode
The mode of function selection used during inlining.
bool shouldWriteStableReportFilename()
Returns whether or not the report filename should be random or not.
IPAKind getIPAMode()
Returns the inter-procedural analysis mode.
Refers to regular member function and operator calls.
bool mayInlineObjCMethod()
Returns true if ObjectiveC inlining is enabled, false otherwise.
bool shouldConditionalizeStaticInitializers()
Returns true if 'static' initializers should be in conditional logic in the CFG.
AnalysisInliningMode
AnalysisInlineFunctionSelection - Set of inlining function selection heuristics.
Refers to constructors (implicit or explicit).
Enable inlining of dynamically dispatched methods.
bool getBooleanOption(StringRef Name, bool DefaultVal, const ento::CheckerBase *C=nullptr, bool SearchInParents=false)
Interprets an option's string value as a boolean.
AnalysisConstraints
AnalysisConstraints - Set of available constraint models.
unsigned getMaxNodesPerTopLevelFunction()
Returns the maximum number of nodes the analyzer can generate while exploring a top level function (f...
AnalysisStores AnalysisStoreOpt
ConfigTable Config
A key-value table of use-specified configuration values.
bool mayInlineCXXStandardLibrary()
Returns whether or not C++ standard library functions may be considered for inlining.
unsigned visualizeExplodedGraphWithUbiGraph
Refers to destructors (implicit or explicit).
unsigned maxBlockVisitOnPath
The maximum number of times the analyzer visits a block.
unsigned DisableAllChecks
Disable all analyzer checks.
StringRef Name
Definition: USRFinder.cpp:123
unsigned getGraphTrimInterval()
Returns how often nodes in the ExplodedGraph should be recycled to save memory.
AnalysisConstraints AnalysisConstraintsOpt
std::string AnalyzeSpecificFunction
bool includeTemporaryDtorsInCFG()
Returns whether or not the destructors for C++ temporary objects should be included in the CFG...
bool shouldSuppressFromCXXStandardLibrary()
Returns whether or not diagnostics reported within the C++ standard library should be suppressed...
AnalysisPurgeMode
AnalysisPurgeModes - Set of available strategies for dead symbol removal.
IntrusiveRefCntPtr< AnalyzerOptions > AnalyzerOptionsRef
bool includeImplicitDtorsInCFG()
Returns whether or not implicit destructors for C++ objects should be included in the CFG...
bool shouldSynthesizeBodies()
Returns true if the analyzer engine should synthesize fake bodies for well-known functions.
unsigned NoRetryExhausted
Do not re-analyze paths leading to exhausted nodes with a different strategy.
bool mayInlineCXXMemberFunction(CXXInlineableMemberKind K)
Returns the option controlling which C++ member functions will be considered for inlining.
Analyses
Analysis - Set of available source code analyses.
llvm::StringMap< std::string > ConfigTable
unsigned getMaxTimesInlineLarge()
Returns the maximum times a large function could be inlined.
CXXInlineableMemberKind
Describes the different kinds of C++ member functions which can be considered for inlining by the ana...
bool mayInlineCXXAllocator()
Returns whether or not allocator call may be considered for inlining.
int getOptionAsInteger(StringRef Name, int DefaultVal, const ento::CheckerBase *C=nullptr, bool SearchInParents=false)
Interprets an option's string value as an integer value.
AnalysisPurgeMode AnalysisPurgeOpt
Enable inlining of dynamically dispatched methods, bifurcate paths when exact type info is unavailabl...
bool mayInlineCXXSharedPtrDtor()
Returns whether or not the destructor of C++ 'shared_ptr' may be considered for inlining.
bool shouldReportIssuesInMainSourceFile()
Returns whether or not the diagnostic report should be always reported in the main source file and no...
AnalysisDiagClients
AnalysisDiagClients - Set of available diagnostic clients for rendering analysis results.
bool shouldInlineLambdas()
Returns true if lambdas should be inlined.