14 #ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_ANALYSISMANAGER_H 15 #define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_ANALYSISMANAGER_H 31 virtual void anchor();
66 return CreateStoreMgr;
74 return CreateConstraintMgr;
113 template <
typename T>
139 if (SM.
getFilename(IL).contains(
"UnifiedSource")) {
142 return llvm::StringSwitch<bool>(SM.
getFilename(SL).rsplit(
'.').second)
143 .Cases(
"c",
"m",
"mm",
"C",
"cc",
"cp",
true)
144 .Cases(
"cpp",
"CPP",
"c++",
"cxx",
"cppm",
true)
AnalysisDeclContextManager & getAnalysisDeclContextManager()
CheckerManager * getCheckerManager() const
Decl - This represents one declaration (or definition), e.g.
~AnalysisManager() override
unsigned visualizeExplodedGraphWithGraphViz
Perform only intra-procedural analysis.
AnalysisManager(ASTContext &ctx, DiagnosticsEngine &diags, const PathDiagnosticConsumers &Consumers, StoreManagerCreator storemgr, ConstraintManagerCreator constraintmgr, CheckerManager *checkerMgr, AnalyzerOptions &Options, CodeInjector *injector=nullptr)
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
AnalysisDeclContext contains the context data for the function or method under analysis.
std::unique_ptr< StoreManager >(* StoreManagerCreator)(ProgramStateManager &)
static bool isInCodeFile(SourceLocation SL, const SourceManager &SM)
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
T * getAnalysis()
Return the specified analysis object, lazily running the analysis if necessary.
Concrete class used by the front-end to report problems and issues.
ArrayRef< PathDiagnosticConsumer * > getPathDiagnosticConsumers() override
bool shouldVisualize() const
ASTContext & getASTContext() override
AnalysisDeclContext * getAnalysisDeclContext(const Decl *D)
StoreManagerCreator getStoreManagerCreator()
std::unique_ptr< ConstraintManager >(* ConstraintManagerCreator)(ProgramStateManager &, SubEngine *)
AnalysisDeclContext * getContext(const Decl *D)
Represents a source-level, intra-procedural CFG that represents the control-flow of a Stmt...
AnalyzerOptions & getAnalyzerOptions() override
ConstraintManagerCreator getConstraintManagerCreator()
CFG * getCFG(Decl const *D)
IPAKind getIPAMode() const
Returns the inter-procedural analysis mode.
StringRef getFilename(SourceLocation SpellingLoc) const
Return the filename of the file containing a SourceLocation.
Encodes a location in the source.
std::vector< PathDiagnosticConsumer * > PathDiagnosticConsumers
ParentMap & getParentMap(Decl const *D)
bool isInMainFile(SourceLocation Loc) const
Returns whether the PresumedLoc for a given SourceLocation is in the main file.
AnalyzerOptions & options
bool isInCodeFile(SourceLocation SL)
SourceManager & getSourceManager() override
Dataflow Directional Tag Classes.
bool isValid() const
Return true if this is a valid SourceLocation object.
CodeInjector is an interface which is responsible for injecting AST of function definitions that may ...
SourceLocation getIncludeLoc(FileID FID) const
Returns the include location if FID is a #include'd file otherwise it returns an invalid location...
const LangOptions & getLangOpts() const
FileID getFileID(SourceLocation SpellingLoc) const
Return the FileID for a SourceLocation.
Stores options for the analyzer from the command line.
SourceManager & getSourceManager()
DiagnosticsEngine & getDiagnostic() override
ParentMap & getParentMap()
void clear()
Discard all previously created AnalysisDeclContexts.
T * getAnalysis(Decl const *D)
This class handles loading and caching of source files into memory.
bool shouldInlineCall() const