Stores options for the analyzer from the command line. More...
#include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"
Stores options for the analyzer from the command line.
Some options are frontend flags (e.g.: -analyzer-output), but some are analyzer configuration options, which are preceded by -analyzer-config (e.g.: -analyzer-config notes-as-events=true).
If you'd like to add a new frontend flag, add it to include/clang/Driver/CC1Options.td, add a new field to store the value of that flag in this class, and initialize it in lib/Frontend/CompilerInvocation.cpp.
If you'd like to add a new non-checker configuration, register it in include/clang/StaticAnalyzer/Core/AnalyzerOptions.def, and refer to the top of the file for documentation.
If you'd like to add a new checker option, call getChecker*Option() whenever.
Some of the options are controlled by raw frontend flags for no good reason, and should be eventually converted into -analyzer-config flags. New analyzer options should not be implemented as frontend flags. Frontend flags still make sense for things that do not affect the actual analysis.
Definition at line 179 of file AnalyzerOptions.h.
◆ ConfigTable ◆ AnalyzerOptions() clang::AnalyzerOptions::AnalyzerOptions ( ) inlineDefinition at line 316 of file AnalyzerOptions.h.
◆ getCheckerBooleanOption() [1/2] ◆ getCheckerBooleanOption() [2/2] bool AnalyzerOptions::getCheckerBooleanOption ( StringRef CheckerName, StringRef OptionName, bool SearchInParents =false
) const
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
.
Name
, or through CheckerManager::getCurrentCheckerName
within the checker's registry function. Checker options are retrieved in the following format: `-analyzer-config CheckerName:OptionName=Value. [in] OptionName Name for option to retrieve. [in] SearchInParents If 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 161 of file AnalyzerOptions.cpp.
References getCheckerStringOption().
Referenced by getCheckerBooleanOption().
◆ getCheckerIntegerOption() [1/2] ◆ getCheckerIntegerOption() [2/2] int AnalyzerOptions::getCheckerIntegerOption ( StringRef CheckerName, StringRef OptionName, bool SearchInParents =false
) const
Interprets an option's string value as an integer value.
If an option value is not provided, returns the given DefaultVal
.
Name
, or through CheckerManager::getCurrentCheckerName
within the checker's registry function. Checker options are retrieved in the following format: `-analyzer-config CheckerName:OptionName=Value. [in] OptionName Name for option to retrieve. [in] SearchInParents If 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 185 of file AnalyzerOptions.cpp.
References getCheckerStringOption().
Referenced by getCheckerIntegerOption().
◆ getCheckerStringOption() [1/2] StringRef AnalyzerOptions::getCheckerStringOption ( const ento::CheckerBase * C, StringRef OptionName, bool SearchInParents =false
) const ◆ getCheckerStringOption() [2/2] StringRef AnalyzerOptions::getCheckerStringOption ( StringRef CheckerName, StringRef OptionName, bool SearchInParents = false
) const
Query an option's string value.
If an option value is not provided, returns the given DefaultVal
.
Name
, or through CheckerManager::getCurrentCheckerName
within the checker's registry function. Checker options are retrieved in the following format: `-analyzer-config CheckerName:OptionName=Value. [in] OptionName Name for option to retrieve. [in] SearchInParents If 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 127 of file AnalyzerOptions.cpp.
Referenced by getCheckerBooleanOption(), getCheckerIntegerOption(), and getCheckerStringOption().
◆ getCTUPhase1Inlining() ◆ getDiagOpts() ◆ getExplorationStrategy() ◆ getIPAMode() IPAKind AnalyzerOptions::getIPAMode ( ) const ◆ getRegisteredCheckers() std::vector< StringRef > clang::AnalyzerOptions::getRegisteredCheckers ( bool IncludeExperimental =false
) inlinestatic
Retrieves the list of checkers generated from Checkers.td.
This doesn't contain statically linked but non-generated checkers and plugin checkers!
Definition at line 430 of file AnalyzerOptions.h.
Referenced by parseAnalyzerConfigs().
◆ getRegisteredPackages() std::vector< StringRef > clang::AnalyzerOptions::getRegisteredPackages ( bool IncludeExperimental =false
) inlinestatic
Retrieves the list of packages generated from Checkers.td.
This doesn't contain statically linked but non-generated packages and plugin packages!
Definition at line 449 of file AnalyzerOptions.h.
Referenced by parseAnalyzerConfigs().
◆ isUnknownAnalyzerConfig() bool clang::AnalyzerOptions::isUnknownAnalyzerConfig ( llvm::StringRef Name ) inline ◆ mayInlineCXXMemberFunction() ◆ printFormattedEntry() void AnalyzerOptions::printFormattedEntry ( llvm::raw_ostream & Out, std::pair< StringRef, StringRef > EntryDescPair, size_t InitialPad, size_t EntryWidth, size_t MinLineWidth =0
) static
Convenience function for printing options or checkers and their description in a formatted manner.
If MinLineWidth
is set to 0, no line breaks are introduced for the description.
Format, depending whether the option name's length is less than EntryWidth:
<padding>EntryName<padding>Description <------—padding------—>Description <------—padding------—>Description
<padding>VeryVeryLongEntryName <------—padding------—>Description <------—padding------—>Description ^~~~~~~~~InitialPad ^~~~~~~~~~~~~~~~~~EntryWidth ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~MinLineWidth
Definition at line 34 of file AnalyzerOptions.cpp.
References clang::C.
Referenced by clang::ento::CheckerRegistryData::printCheckerOptionList(), and clang::ento::CheckerRegistryData::printCheckerWithDescList().
◆ AnalysisConstraintsOpt ◆ AnalysisDiagOpt ◆ AnalysisPurgeOpt ◆ AnalyzeAll ◆ AnalyzerDisplayProgress unsigned clang::AnalyzerOptions::AnalyzerDisplayProgress ◆ AnalyzerNoteAnalysisEntryPoints ◆ AnalyzerWerror bool clang::AnalyzerOptions::AnalyzerWerror ◆ AnalyzeSpecificFunction std::string clang::AnalyzerOptions::AnalyzeSpecificFunction ◆ CheckersAndPackages std::vector<std::pair<std::string, bool> > clang::AnalyzerOptions::CheckersAndPackages ◆ Config ◆ DisableAllCheckers unsigned clang::AnalyzerOptions::DisableAllCheckersDisable all analyzer checkers.
This flag allows one to disable analyzer checkers 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 245 of file AnalyzerOptions.h.
◆ DumpExplodedGraphTo std::string clang::AnalyzerOptions::DumpExplodedGraphToFile path to which the exploded graph should be dumped.
Definition at line 231 of file AnalyzerOptions.h.
◆ FullCompilerInvocation std::string clang::AnalyzerOptions::FullCompilerInvocation ◆ InlineMaxStackDepth unsigned clang::AnalyzerOptions::InlineMaxStackDepth ◆ InliningMode ◆ maxBlockVisitOnPath unsigned clang::AnalyzerOptions::maxBlockVisitOnPath ◆ NoRetryExhausted unsigned clang::AnalyzerOptions::NoRetryExhausted ◆ PrintStats ◆ ShouldEmitErrorsOnInvalidConfigValue unsigned clang::AnalyzerOptions::ShouldEmitErrorsOnInvalidConfigValue ◆ ShowCheckerHelp unsigned clang::AnalyzerOptions::ShowCheckerHelp ◆ ShowCheckerHelpAlpha unsigned clang::AnalyzerOptions::ShowCheckerHelpAlpha ◆ ShowCheckerHelpDeveloper unsigned clang::AnalyzerOptions::ShowCheckerHelpDeveloper ◆ ShowCheckerOptionAlphaList unsigned clang::AnalyzerOptions::ShowCheckerOptionAlphaList ◆ ShowCheckerOptionDeveloperList unsigned clang::AnalyzerOptions::ShowCheckerOptionDeveloperList ◆ ShowCheckerOptionList unsigned clang::AnalyzerOptions::ShowCheckerOptionList ◆ ShowConfigOptionsList unsigned clang::AnalyzerOptions::ShowConfigOptionsList ◆ ShowEnabledCheckerList unsigned clang::AnalyzerOptions::ShowEnabledCheckerList ◆ SilencedCheckersAndPackages std::vector<std::string> clang::AnalyzerOptions::SilencedCheckersAndPackages ◆ TrimGraph ◆ UnoptimizedCFG ◆ visualizeExplodedGraphWithGraphViz unsigned clang::AnalyzerOptions::visualizeExplodedGraphWithGraphVizThe documentation for this class was generated from the following files:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4