clang  8.0.0svn
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
clang::AnalyzerOptions Class Reference

#include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"

Inheritance diagram for clang::AnalyzerOptions:
Inheritance graph
[legend]
Collaboration diagram for clang::AnalyzerOptions:
Collaboration graph
[legend]

Public Types

enum  ExplorationStrategyKind {
  ExplorationStrategyKind::DFS, ExplorationStrategyKind::BFS, ExplorationStrategyKind::UnexploredFirst, ExplorationStrategyKind::UnexploredFirstQueue,
  ExplorationStrategyKind::BFSBlockDFSContents, ExplorationStrategyKind::NotSet
}
 
using ConfigTable = llvm::StringMap< std::string >
 

Public Member Functions

 AnalyzerOptions ()
 
bool getBooleanOption (StringRef Name, bool DefaultVal, const ento::CheckerBase *C=nullptr, bool SearchInParents=false)
 Interprets an option's string value as a boolean. More...
 
bool getBooleanOption (Optional< bool > &V, StringRef Name, bool DefaultVal, const ento::CheckerBase *C=nullptr, bool SearchInParents=false)
 Variant that accepts a Optional value to cache the result. More...
 
int getOptionAsInteger (StringRef Name, int DefaultVal, const ento::CheckerBase *C=nullptr, bool SearchInParents=false)
 Interprets an option's string value as an integer value. More...
 
StringRef getOptionAsString (StringRef Name, StringRef DefaultVal, const ento::CheckerBase *C=nullptr, bool SearchInParents=false)
 Query an option's string value. More...
 
UserModeKind getUserMode ()
 Retrieves and sets the UserMode. More...
 
ExplorationStrategyKind getExplorationStrategy ()
 
IPAKind getIPAMode ()
 Returns the inter-procedural analysis mode. More...
 
bool mayInlineCXXMemberFunction (CXXInlineableMemberKind K)
 Returns the option controlling which C++ member functions will be considered for inlining. More...
 
bool mayInlineObjCMethod ()
 Returns true if ObjectiveC inlining is enabled, false otherwise. More...
 
bool includeTemporaryDtorsInCFG ()
 Returns whether or not the destructors for C++ temporary objects should be included in the CFG. More...
 
bool includeImplicitDtorsInCFG ()
 Returns whether or not implicit destructors for C++ objects should be included in the CFG. More...
 
bool includeLifetimeInCFG ()
 Returns whether or not end-of-lifetime information should be included in the CFG. More...
 
bool includeLoopExitInCFG ()
 Returns whether or not the end of the loop information should be included in the CFG. More...
 
bool includeRichConstructorsInCFG ()
 Returns whether or not construction site information should be included in the CFG C++ constructor elements. More...
 
bool includeScopesInCFG ()
 Returns whether or not scope information should be included in the CFG. More...
 
bool mayInlineCXXStandardLibrary ()
 Returns whether or not C++ standard library functions may be considered for inlining. More...
 
bool mayInlineTemplateFunctions ()
 Returns whether or not templated functions may be considered for inlining. More...
 
bool mayInlineCXXAllocator ()
 Returns whether or not allocator call may be considered for inlining. More...
 
bool mayInlineCXXContainerMethods ()
 Returns whether or not methods of C++ container objects may be considered for inlining. More...
 
bool mayInlineCXXSharedPtrDtor ()
 Returns whether or not the destructor of C++ 'shared_ptr' may be considered for inlining. More...
 
bool mayInlineCXXTemporaryDtors ()
 Returns true if C++ temporary destructors should be inlined during analysis. More...
 
bool shouldSuppressNullReturnPaths ()
 Returns whether or not paths that go through null returns should be suppressed. More...
 
bool shouldAvoidSuppressingNullArgumentPaths ()
 Returns whether a bug report should not be suppressed if its path includes a call with a null argument, even if that call has a null return. More...
 
bool shouldSuppressInlinedDefensiveChecks ()
 Returns whether or not diagnostics containing inlined defensive NULL checks should be suppressed. More...
 
bool shouldSuppressFromCXXStandardLibrary ()
 Returns whether or not diagnostics reported within the C++ standard library should be suppressed. More...
 
bool shouldCrosscheckWithZ3 ()
 Returns whether bug reports should be crosschecked with the Z3 constraint manager backend. More...
 
bool shouldReportIssuesInMainSourceFile ()
 Returns whether or not the diagnostic report should be always reported in the main source file and not the headers. More...
 
bool shouldWriteStableReportFilename ()
 Returns whether or not the report filename should be random or not. More...
 
bool shouldSerializeStats ()
 
bool shouldPrunePaths ()
 Returns whether irrelevant parts of a bug report path should be pruned out of the final output. More...
 
bool shouldConditionalizeStaticInitializers ()
 Returns true if 'static' initializers should be in conditional logic in the CFG. More...
 
unsigned getAlwaysInlineSize ()
 
unsigned getMaxInlinableSize ()
 
bool shouldSynthesizeBodies ()
 Returns true if the analyzer engine should synthesize fake bodies for well-known functions. More...
 
unsigned getGraphTrimInterval ()
 Returns how often nodes in the ExplodedGraph should be recycled to save memory. More...
 
unsigned getMaxSymbolComplexity ()
 Returns the maximum complexity of symbolic constraint (50 by default). More...
 
unsigned getMaxTimesInlineLarge ()
 Returns the maximum times a large function could be inlined. More...
 
unsigned getMinCFGSizeTreatFunctionsAsLarge ()
 Returns the number of basic blocks a function needs to have to be considered large for the 'max-times-inline-large' config option. More...
 
unsigned getMaxNodesPerTopLevelFunction ()
 Returns the maximum number of nodes the analyzer can generate while exploring a top level function (for each exploded graph). More...
 
bool shouldInlineLambdas ()
 Returns true if lambdas should be inlined. More...
 
bool shouldWidenLoops ()
 Returns true if the analysis should try to widen loops. More...
 
bool shouldUnrollLoops ()
 Returns true if the analysis should try to unroll loops with known bounds. More...
 
bool shouldDisplayNotesAsEvents ()
 Returns true if the bug reporter should transparently treat extra note diagnostic pieces as event diagnostic pieces. More...
 
bool shouldAggressivelySimplifyBinaryOperation ()
 Returns true if SValBuilder should rearrange comparisons and additive operations of symbolic expressions which consist of a sum of a symbol and a concrete integer into the format where symbols are on the left-hand side and the integer is on the right. More...
 
bool shouldEagerlyAssume ()
 Returns true if we should eagerly assume evaluations of conditionals, thus, bifurcating the path. More...
 
StringRef getCTUDir ()
 Returns the directory containing the CTU related files. More...
 
StringRef getCTUIndexName ()
 Returns the name of the file containing the CTU index of functions. More...
 
bool naiveCTUEnabled ()
 Returns true when naive cross translation unit analysis is enabled. More...
 
bool shouldElideConstructors ()
 Returns true if elidable C++ copy-constructors and move-constructors should be actually elided during analysis. More...
 

Static Public Member Functions

static std::vector< StringRef > getRegisteredCheckers (bool IncludeExperimental=false)
 

Public Attributes

std::vector< std::pair< std::string, bool > > CheckersControlList
 Pair of checker name and enable/disable. More...
 
ConfigTable Config
 A key-value table of use-specified configuration values. More...
 
AnalysisStores AnalysisStoreOpt = RegionStoreModel
 
AnalysisConstraints AnalysisConstraintsOpt = RangeConstraintsModel
 
AnalysisDiagClients AnalysisDiagOpt = PD_HTML
 
AnalysisPurgeMode AnalysisPurgeOpt = PurgeStmt
 
std::string AnalyzeSpecificFunction
 
std::string FullCompilerInvocation
 Store full compiler invocation for reproducible instructions in the generated report. More...
 
unsigned maxBlockVisitOnPath
 The maximum number of times the analyzer visits a block. More...
 
unsigned DisableAllChecks: 1
 Disable all analyzer checks. More...
 
unsigned ShowCheckerHelp: 1
 
unsigned ShowEnabledCheckerList: 1
 
unsigned AnalyzeAll: 1
 
unsigned AnalyzerDisplayProgress: 1
 
unsigned AnalyzeNestedBlocks: 1
 
unsigned eagerlyAssumeBinOpBifurcation: 1
 
unsigned TrimGraph: 1
 
unsigned visualizeExplodedGraphWithGraphViz: 1
 
unsigned UnoptimizedCFG: 1
 
unsigned PrintStats: 1
 
unsigned NoRetryExhausted: 1
 Do not re-analyze paths leading to exhausted nodes with a different strategy. More...
 
unsigned InlineMaxStackDepth = 5
 The inlining stack depth limit. More...
 
AnalysisInliningMode InliningMode = NoRedundancy
 The mode of function selection used during inlining. More...
 

Detailed Description

Definition at line 124 of file AnalyzerOptions.h.

Member Typedef Documentation

◆ ConfigTable

using clang::AnalyzerOptions::ConfigTable = llvm::StringMap<std::string>

Definition at line 126 of file AnalyzerOptions.h.

Member Enumeration Documentation

◆ ExplorationStrategyKind

Enumerator
DFS 
BFS 
UnexploredFirst 
UnexploredFirstQueue 
BFSBlockDFSContents 
NotSet 

Definition at line 181 of file AnalyzerOptions.h.

Constructor & Destructor Documentation

◆ AnalyzerOptions()

clang::AnalyzerOptions::AnalyzerOptions ( )
inline

Definition at line 357 of file AnalyzerOptions.h.

Member Function Documentation

◆ getAlwaysInlineSize()

unsigned AnalyzerOptions::getAlwaysInlineSize ( )

Definition at line 359 of file AnalyzerOptions.cpp.

Referenced by mayInlineDecl().

◆ getBooleanOption() [1/2]

bool clang::AnalyzerOptions::getBooleanOption ( StringRef  Name,
bool  DefaultVal,
const ento::CheckerBase C = nullptr,
bool  SearchInParents = false 
)

Interprets an option's string value as a boolean.

The "true" string is interpreted as true and the "false" string is interpreted as false.

If an option value is not provided, returns the given DefaultVal.

Parameters
[in]NameName for option to retrieve.
[in]DefaultValDefault value returned if no such option was specified.
[in]CThe optional checker parameter that can be used to restrict the search to the options of this particular checker (and its parents depending on search mode).
[in]SearchInParentsIf set to true and the searched option was not specified for the given checker the options for the parent packages will be searched as well. The inner packages take precedence over the outer ones.

Referenced by clang::ento::allocation_state::markReleased(), clang::ento::registerInnerPointerCheckerAux(), clang::ento::retaincountchecker::RetainCountChecker::shouldCheckOSObjectRetainCount(), and clang::ento::shouldIncludeAllocationSiteInLeakDiagnostics().

◆ getBooleanOption() [2/2]

bool clang::AnalyzerOptions::getBooleanOption ( Optional< bool > &  V,
StringRef  Name,
bool  DefaultVal,
const ento::CheckerBase C = nullptr,
bool  SearchInParents = false 
)

Variant that accepts a Optional value to cache the result.

Parameters
[in,out]VReturn value storage, returned if parameter contains an existing valid option, else it is used to store a return value
[in]NameName for option to retrieve.
[in]DefaultValDefault value returned if no such option was specified.
[in]CThe optional checker parameter that can be used to restrict the search to the options of this particular checker (and its parents depending on search mode).
[in]SearchInParentsIf set to true and the searched option was not specified for the given checker the options for the parent packages will be searched as well. The inner packages take precedence over the outer ones.

◆ getCTUDir()

StringRef AnalyzerOptions::getCTUDir ( )

Returns the directory containing the CTU related files.

Definition at line 481 of file AnalyzerOptions.cpp.

Referenced by clang::ento::AnyFunctionCall::getRuntimeDefinition().

◆ getCTUIndexName()

StringRef AnalyzerOptions::getCTUIndexName ( )

Returns the name of the file containing the CTU index of functions.

Definition at line 498 of file AnalyzerOptions.cpp.

Referenced by clang::ento::AnyFunctionCall::getRuntimeDefinition().

◆ getExplorationStrategy()

AnalyzerOptions::ExplorationStrategyKind AnalyzerOptions::getExplorationStrategy ( )

Definition at line 66 of file AnalyzerOptions.cpp.

Referenced by generateWorkList().

◆ getGraphTrimInterval()

unsigned AnalyzerOptions::getGraphTrimInterval ( )

Returns how often nodes in the ExplodedGraph should be recycled to save memory.

This is controlled by the 'graph-trim-interval' config option. To disable node reclamation, set the option to "0".

Definition at line 385 of file AnalyzerOptions.cpp.

Referenced by clang::ento::ExprEngine::ExprEngine().

◆ getIPAMode()

IPAKind AnalyzerOptions::getIPAMode ( )

◆ getMaxInlinableSize()

unsigned AnalyzerOptions::getMaxInlinableSize ( )

Definition at line 365 of file AnalyzerOptions.cpp.

Referenced by mayInlineDecl().

◆ getMaxNodesPerTopLevelFunction()

unsigned AnalyzerOptions::getMaxNodesPerTopLevelFunction ( )

Returns the maximum number of nodes the analyzer can generate while exploring a top level function (for each exploded graph).

150000 is default; 0 means no limit.

This is controlled by the 'max-nodes' config option.

Definition at line 410 of file AnalyzerOptions.cpp.

◆ getMaxSymbolComplexity()

unsigned AnalyzerOptions::getMaxSymbolComplexity ( )

Returns the maximum complexity of symbolic constraint (50 by default).

This is controlled by "-analyzer-config max-symbol-complexity" option.

Definition at line 391 of file AnalyzerOptions.cpp.

Referenced by clang::ento::SValBuilder::makeSymExprValNN().

◆ getMaxTimesInlineLarge()

unsigned AnalyzerOptions::getMaxTimesInlineLarge ( )

Returns the maximum times a large function could be inlined.

This is controlled by the 'max-times-inline-large' config option.

Definition at line 397 of file AnalyzerOptions.cpp.

Referenced by mayInlineDecl().

◆ getMinCFGSizeTreatFunctionsAsLarge()

unsigned AnalyzerOptions::getMinCFGSizeTreatFunctionsAsLarge ( )

Returns the number of basic blocks a function needs to have to be considered large for the 'max-times-inline-large' config option.

This is controlled by the 'min-cfg-size-treat-functions-as-large' config option.

Definition at line 403 of file AnalyzerOptions.cpp.

Referenced by mayInlineDecl().

◆ getOptionAsInteger()

int AnalyzerOptions::getOptionAsInteger ( StringRef  Name,
int  DefaultVal,
const ento::CheckerBase C = nullptr,
bool  SearchInParents = false 
)

Interprets an option's string value as an integer value.

If an option value is not provided, returns the given DefaultVal.

Parameters
[in]NameName for option to retrieve.
[in]DefaultValDefault value returned if no such option was specified.
[in]CThe optional checker parameter that can be used to restrict the search to the options of this particular checker (and its parents depending on search mode).
[in]SearchInParentsIf set to true and the searched option was not specified for the given checker the options for the parent packages will be searched as well. The inner packages take precedence over the outer ones.

Definition at line 330 of file AnalyzerOptions.cpp.

◆ getOptionAsString()

StringRef AnalyzerOptions::getOptionAsString ( StringRef  Name,
StringRef  DefaultVal,
const ento::CheckerBase C = nullptr,
bool  SearchInParents = false 
)

Query an option's string value.

If an option value is not provided, returns the given DefaultVal.

Parameters
[in]NameName for option to retrieve.
[in]DefaultValDefault value returned if no such option was specified.
[in]CThe optional checker parameter that can be used to restrict the search to the options of this particular checker (and its parents depending on search mode).
[in]SearchInParentsIf set to true and the searched option was not specified for the given checker the options for the parent packages will be searched as well. The inner packages take precedence over the outer ones.

Definition at line 349 of file AnalyzerOptions.cpp.

◆ getRegisteredCheckers()

std::vector< StringRef > AnalyzerOptions::getRegisteredCheckers ( bool  IncludeExperimental = false)
static

Definition at line 34 of file AnalyzerOptions.cpp.

◆ getUserMode()

AnalyzerOptions::UserModeKind AnalyzerOptions::getUserMode ( )

Retrieves and sets the UserMode.

This is a high-level option, which is used to set other low-level options. It is not accessible outside of AnalyzerOptions.

Definition at line 52 of file AnalyzerOptions.cpp.

◆ includeImplicitDtorsInCFG()

bool AnalyzerOptions::includeImplicitDtorsInCFG ( )

Returns whether or not implicit destructors for C++ objects should be included in the CFG.

This is controlled by the 'cfg-implicit-dtors' config option, which accepts the values "true" and "false".

Definition at line 205 of file AnalyzerOptions.cpp.

◆ includeLifetimeInCFG()

bool AnalyzerOptions::includeLifetimeInCFG ( )

Returns whether or not end-of-lifetime information should be included in the CFG.

This is controlled by the 'cfg-lifetime' config option, which accepts the values "true" and "false".

Definition at line 211 of file AnalyzerOptions.cpp.

◆ includeLoopExitInCFG()

bool AnalyzerOptions::includeLoopExitInCFG ( )

Returns whether or not the end of the loop information should be included in the CFG.

This is controlled by the 'cfg-loopexit' config option, which accepts the values "true" and "false".

Definition at line 216 of file AnalyzerOptions.cpp.

◆ includeRichConstructorsInCFG()

bool AnalyzerOptions::includeRichConstructorsInCFG ( )

Returns whether or not construction site information should be included in the CFG C++ constructor elements.

This is controlled by the 'cfg-rich-constructors' config options, which accepts the values "true" and "false".

Definition at line 221 of file AnalyzerOptions.cpp.

◆ includeScopesInCFG()

bool AnalyzerOptions::includeScopesInCFG ( )

Returns whether or not scope information should be included in the CFG.

This is controlled by the 'cfg-scope-info' config option, which accepts the values "true" and "false".

Definition at line 227 of file AnalyzerOptions.cpp.

◆ includeTemporaryDtorsInCFG()

bool AnalyzerOptions::includeTemporaryDtorsInCFG ( )

Returns whether or not the destructors for C++ temporary objects should be included in the CFG.

This is controlled by the 'cfg-temporary-dtors' config option, which accepts the values "true" and "false".

Definition at line 199 of file AnalyzerOptions.cpp.

◆ mayInlineCXXAllocator()

bool AnalyzerOptions::mayInlineCXXAllocator ( )

Returns whether or not allocator call may be considered for inlining.

This is controlled by the 'c++-allocator-inlining' config option, which accepts the values "true" and "false".

Definition at line 245 of file AnalyzerOptions.cpp.

Referenced by clang::ento::ExprEngine::ProcessNewAllocator(), and clang::ento::ExprEngine::VisitCXXNewExpr().

◆ mayInlineCXXContainerMethods()

bool AnalyzerOptions::mayInlineCXXContainerMethods ( )

Returns whether or not methods of C++ container objects may be considered for inlining.

This is controlled by the 'c++-container-inlining' config option, which accepts the values "true" and "false".

Definition at line 251 of file AnalyzerOptions.cpp.

Referenced by mayInlineDecl().

◆ mayInlineCXXMemberFunction()

bool AnalyzerOptions::mayInlineCXXMemberFunction ( CXXInlineableMemberKind  K)

Returns the option controlling which C++ member functions will be considered for inlining.

This is controlled by the 'c++-inlining' config option.

See also
CXXMemberInliningMode

Definition at line 122 of file AnalyzerOptions.cpp.

References clang::CIMK_Constructors, clang::CIMK_Destructors, clang::CIMK_MemberFunctions, clang::CIMK_None, and clang::IPAK_Inlining.

◆ mayInlineCXXSharedPtrDtor()

bool AnalyzerOptions::mayInlineCXXSharedPtrDtor ( )

Returns whether or not the destructor of C++ 'shared_ptr' may be considered for inlining.

This covers std::shared_ptr, std::tr1::shared_ptr, and boost::shared_ptr, and indeed any destructor named "~shared_ptr".

This is controlled by the 'c++-shared_ptr-inlining' config option, which accepts the values "true" and "false".

Definition at line 257 of file AnalyzerOptions.cpp.

Referenced by mayInlineDecl().

◆ mayInlineCXXStandardLibrary()

bool AnalyzerOptions::mayInlineCXXStandardLibrary ( )

Returns whether or not C++ standard library functions may be considered for inlining.

This is controlled by the 'c++-stdlib-inlining' config option, which accepts the values "true" and "false".

Definition at line 233 of file AnalyzerOptions.cpp.

Referenced by mayInlineDecl().

◆ mayInlineCXXTemporaryDtors()

bool AnalyzerOptions::mayInlineCXXTemporaryDtors ( )

Returns true if C++ temporary destructors should be inlined during analysis.

If temporary destructors are disabled in the CFG via the 'cfg-temporary-dtors' option, temporary destructors would not be inlined anyway.

This is controlled by the 'c++-temp-dtor-inlining' config option, which accepts the values "true" and "false".

Definition at line 263 of file AnalyzerOptions.cpp.

◆ mayInlineObjCMethod()

bool AnalyzerOptions::mayInlineObjCMethod ( )

Returns true if ObjectiveC inlining is enabled, false otherwise.

Definition at line 269 of file AnalyzerOptions.cpp.

◆ mayInlineTemplateFunctions()

bool AnalyzerOptions::mayInlineTemplateFunctions ( )

Returns whether or not templated functions may be considered for inlining.

This is controlled by the 'c++-template-inlining' config option, which accepts the values "true" and "false".

Definition at line 239 of file AnalyzerOptions.cpp.

Referenced by mayInlineDecl().

◆ naiveCTUEnabled()

bool AnalyzerOptions::naiveCTUEnabled ( )

Returns true when naive cross translation unit analysis is enabled.

This is an experimental feature to inline functions from another translation units.

Definition at line 490 of file AnalyzerOptions.cpp.

Referenced by clang::ento::AnyFunctionCall::getRuntimeDefinition().

◆ shouldAggressivelySimplifyBinaryOperation()

bool AnalyzerOptions::shouldAggressivelySimplifyBinaryOperation ( )

Returns true if SValBuilder should rearrange comparisons and additive operations of symbolic expressions which consist of a sum of a symbol and a concrete integer into the format where symbols are on the left-hand side and the integer is on the right.

This is only done if both symbols and both concrete integers are signed, greater than or equal to the quarter of the minimum value of the type and less than or equal to the quarter of the maximum value of that type.

A + n <OP> B + m becomes A - B <OP> m - n, where A and B symbolic, n and m are integers. <OP> is any of '==', '!=', '<', '<=', '>', '>=', '+' or '-'. The rearrangement also happens with '-' instead of '+' on

Definition at line 466 of file AnalyzerOptions.cpp.

◆ shouldAvoidSuppressingNullArgumentPaths()

bool AnalyzerOptions::shouldAvoidSuppressingNullArgumentPaths ( )

Returns whether a bug report should not be suppressed if its path includes a call with a null argument, even if that call has a null return.

This option has no effect when shouldSuppressNullReturnPaths() is false.

This is a counter-heuristic to avoid false negatives.

This is controlled by the 'avoid-suppressing-null-argument-paths' config option, which accepts the values "true" and "false".

Definition at line 281 of file AnalyzerOptions.cpp.

◆ shouldConditionalizeStaticInitializers()

bool AnalyzerOptions::shouldConditionalizeStaticInitializers ( )

Returns true if 'static' initializers should be in conditional logic in the CFG.

Definition at line 437 of file AnalyzerOptions.cpp.

◆ shouldCrosscheckWithZ3()

bool AnalyzerOptions::shouldCrosscheckWithZ3 ( )

Returns whether bug reports should be crosschecked with the Z3 constraint manager backend.

This is controlled by the 'crosscheck-with-z3' config option, which accepts the values "true" and "false".

Definition at line 299 of file AnalyzerOptions.cpp.

◆ shouldDisplayNotesAsEvents()

bool AnalyzerOptions::shouldDisplayNotesAsEvents ( )

Returns true if the bug reporter should transparently treat extra note diagnostic pieces as event diagnostic pieces.

Useful when the diagnostic consumer doesn't support the extra note pieces.

This is controlled by the 'extra-notes-as-events' option, which defaults to false when unset.

Definition at line 459 of file AnalyzerOptions.cpp.

◆ shouldEagerlyAssume()

bool AnalyzerOptions::shouldEagerlyAssume ( )

Returns true if we should eagerly assume evaluations of conditionals, thus, bifurcating the path.

This indicates how the engine should handle expressions such as: 'x = (y != 0)'. When this is true then the subexpression 'y != 0' will be eagerly assumed to be true or false, thus evaluating it to the integers 0 or 1 respectively. The upside is that this can increase analysis precision until we have a better way to lazily evaluate such logic. The downside is that it eagerly bifurcates paths.

Definition at line 474 of file AnalyzerOptions.cpp.

◆ shouldElideConstructors()

bool AnalyzerOptions::shouldElideConstructors ( )

Returns true if elidable C++ copy-constructors and move-constructors should be actually elided during analysis.

Both behaviors are allowed by the C++ standard, and the analyzer, like CodeGen, defaults to eliding. Starting with C++17 some elisions become mandatory, and in these cases the option will be ignored.

Definition at line 324 of file AnalyzerOptions.cpp.

◆ shouldInlineLambdas()

bool AnalyzerOptions::shouldInlineLambdas ( )

Returns true if lambdas should be inlined.

Otherwise a sink node will be generated each time a LambdaExpr is visited.

Definition at line 441 of file AnalyzerOptions.cpp.

◆ shouldPrunePaths()

bool AnalyzerOptions::shouldPrunePaths ( )

Returns whether irrelevant parts of a bug report path should be pruned out of the final output.

This is controlled by the 'prune-paths' config option, which accepts the values "true" and "false".

Definition at line 433 of file AnalyzerOptions.cpp.

Referenced by generatePathDiagnosticForConsumer().

◆ shouldReportIssuesInMainSourceFile()

bool AnalyzerOptions::shouldReportIssuesInMainSourceFile ( )

Returns whether or not the diagnostic report should be always reported in the main source file and not the headers.

This is controlled by the 'report-in-main-source-file' config option, which accepts the values "true" and "false".

Definition at line 305 of file AnalyzerOptions.cpp.

◆ shouldSerializeStats()

bool AnalyzerOptions::shouldSerializeStats ( )
Returns
Whether the analyzer should serialize statistics to plist output. Statistics would be serialized in JSON format inside the main dictionary under the statistics key. Available only if compiled in assert mode or with LLVM statistics explicitly enabled.

Definition at line 318 of file AnalyzerOptions.cpp.

◆ shouldSuppressFromCXXStandardLibrary()

bool AnalyzerOptions::shouldSuppressFromCXXStandardLibrary ( )

Returns whether or not diagnostics reported within the C++ standard library should be suppressed.

This is controlled by the 'suppress-c++-stdlib' config option, which accepts the values "true" and "false".

Definition at line 293 of file AnalyzerOptions.cpp.

◆ shouldSuppressInlinedDefensiveChecks()

bool AnalyzerOptions::shouldSuppressInlinedDefensiveChecks ( )

Returns whether or not diagnostics containing inlined defensive NULL checks should be suppressed.

This is controlled by the 'suppress-inlined-defensive-checks' config option, which accepts the values "true" and "false".

Definition at line 287 of file AnalyzerOptions.cpp.

◆ shouldSuppressNullReturnPaths()

bool AnalyzerOptions::shouldSuppressNullReturnPaths ( )

Returns whether or not paths that go through null returns should be suppressed.

This is a heuristic for avoiding bug reports with paths that go through inlined functions that are more defensive than their callers.

This is controlled by the 'suppress-null-return-paths' config option, which accepts the values "true" and "false".

Definition at line 275 of file AnalyzerOptions.cpp.

◆ shouldSynthesizeBodies()

bool AnalyzerOptions::shouldSynthesizeBodies ( )

Returns true if the analyzer engine should synthesize fake bodies for well-known functions.

Definition at line 429 of file AnalyzerOptions.cpp.

◆ shouldUnrollLoops()

bool AnalyzerOptions::shouldUnrollLoops ( )

Returns true if the analysis should try to unroll loops with known bounds.

This is controlled by the 'unroll-loops' config option.

Definition at line 453 of file AnalyzerOptions.cpp.

◆ shouldWidenLoops()

bool AnalyzerOptions::shouldWidenLoops ( )

Returns true if the analysis should try to widen loops.

This is controlled by the 'widen-loops' config option.

Definition at line 447 of file AnalyzerOptions.cpp.

◆ shouldWriteStableReportFilename()

bool AnalyzerOptions::shouldWriteStableReportFilename ( )

Returns whether or not the report filename should be random or not.

This is controlled by the 'stable-report-filename' config option, which accepts the values "true" and "false". Default = false

Definition at line 312 of file AnalyzerOptions.cpp.

Member Data Documentation

◆ AnalysisConstraintsOpt

AnalysisConstraints clang::AnalyzerOptions::AnalysisConstraintsOpt = RangeConstraintsModel

Definition at line 137 of file AnalyzerOptions.h.

◆ AnalysisDiagOpt

AnalysisDiagClients clang::AnalyzerOptions::AnalysisDiagOpt = PD_HTML

Definition at line 138 of file AnalyzerOptions.h.

◆ AnalysisPurgeOpt

AnalysisPurgeMode clang::AnalyzerOptions::AnalysisPurgeOpt = PurgeStmt

Definition at line 139 of file AnalyzerOptions.h.

Referenced by clang::ento::ExprEngine::processCallExit().

◆ AnalysisStoreOpt

AnalysisStores clang::AnalyzerOptions::AnalysisStoreOpt = RegionStoreModel

Definition at line 136 of file AnalyzerOptions.h.

◆ AnalyzeAll

unsigned clang::AnalyzerOptions::AnalyzeAll

Definition at line 159 of file AnalyzerOptions.h.

◆ AnalyzeNestedBlocks

unsigned clang::AnalyzerOptions::AnalyzeNestedBlocks

Definition at line 161 of file AnalyzerOptions.h.

◆ AnalyzerDisplayProgress

unsigned clang::AnalyzerOptions::AnalyzerDisplayProgress

Definition at line 160 of file AnalyzerOptions.h.

◆ AnalyzeSpecificFunction

std::string clang::AnalyzerOptions::AnalyzeSpecificFunction

Definition at line 141 of file AnalyzerOptions.h.

◆ CheckersControlList

std::vector<std::pair<std::string, bool> > clang::AnalyzerOptions::CheckersControlList

Pair of checker name and enable/disable.

Definition at line 132 of file AnalyzerOptions.h.

Referenced by getCheckerOptList().

◆ Config

ConfigTable clang::AnalyzerOptions::Config

A key-value table of use-specified configuration values.

Definition at line 135 of file AnalyzerOptions.h.

Referenced by clang::ento::CheckerRegistry::validateCheckerOptions().

◆ DisableAllChecks

unsigned clang::AnalyzerOptions::DisableAllChecks

Disable all analyzer checks.

This flag allows one to disable analyzer checks on the code processed by the given analysis consumer. Note, the code will get parsed and the command-line options will get checked.

Definition at line 155 of file AnalyzerOptions.h.

◆ eagerlyAssumeBinOpBifurcation

unsigned clang::AnalyzerOptions::eagerlyAssumeBinOpBifurcation

Definition at line 163 of file AnalyzerOptions.h.

◆ FullCompilerInvocation

std::string clang::AnalyzerOptions::FullCompilerInvocation

Store full compiler invocation for reproducible instructions in the generated report.

Definition at line 145 of file AnalyzerOptions.h.

◆ InlineMaxStackDepth

unsigned clang::AnalyzerOptions::InlineMaxStackDepth = 5

The inlining stack depth limit.

Definition at line 176 of file AnalyzerOptions.h.

Referenced by mayInlineDecl().

◆ InliningMode

AnalysisInliningMode clang::AnalyzerOptions::InliningMode = NoRedundancy

The mode of function selection used during inlining.

Definition at line 179 of file AnalyzerOptions.h.

◆ maxBlockVisitOnPath

unsigned clang::AnalyzerOptions::maxBlockVisitOnPath

The maximum number of times the analyzer visits a block.

Definition at line 148 of file AnalyzerOptions.h.

◆ NoRetryExhausted

unsigned clang::AnalyzerOptions::NoRetryExhausted

Do not re-analyze paths leading to exhausted nodes with a different strategy.

We get better code coverage when retry is enabled.

Definition at line 172 of file AnalyzerOptions.h.

◆ PrintStats

unsigned clang::AnalyzerOptions::PrintStats

Definition at line 168 of file AnalyzerOptions.h.

◆ ShowCheckerHelp

unsigned clang::AnalyzerOptions::ShowCheckerHelp

Definition at line 157 of file AnalyzerOptions.h.

◆ ShowEnabledCheckerList

unsigned clang::AnalyzerOptions::ShowEnabledCheckerList

Definition at line 158 of file AnalyzerOptions.h.

◆ TrimGraph

unsigned clang::AnalyzerOptions::TrimGraph

Definition at line 165 of file AnalyzerOptions.h.

◆ UnoptimizedCFG

unsigned clang::AnalyzerOptions::UnoptimizedCFG

Definition at line 167 of file AnalyzerOptions.h.

◆ visualizeExplodedGraphWithGraphViz

unsigned clang::AnalyzerOptions::visualizeExplodedGraphWithGraphViz

Definition at line 166 of file AnalyzerOptions.h.

Referenced by clang::ento::AnalysisManager::shouldVisualize().


The documentation for this class was generated from the following files: