class CheckerManager

Declaration

class CheckerManager { /* full declaration omitted */ };

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:126

Member Variables

private clang::ASTContext* Context = nullptr
private const clang::LangOptions LangOpts
private const clang::AnalyzerOptions& AOptions
private const clang::Preprocessor* PP = nullptr
private clang::ento::CheckerNameRef CurrentCheckerName
private clang::DiagnosticsEngine& Diags
private std::unique_ptr<CheckerRegistryData> RegistryData
private llvm::DenseMap<CheckerTag, CheckerRef> CheckerTags
private std::vector<CheckerDtor> CheckerDtors
private std::vector<DeclCheckerInfo> DeclCheckers
private std::vector<CheckDeclFunc> BodyCheckers
private clang::ento::CheckerManager:: CachedDeclCheckersMapTy CachedDeclCheckersMap
private std::vector<StmtCheckerInfo> StmtCheckers
private clang::ento::CheckerManager:: CachedStmtCheckersMapTy CachedStmtCheckersMap
private std::vector<CheckObjCMessageFunc> PreObjCMessageCheckers
private std::vector<CheckObjCMessageFunc> PostObjCMessageCheckers
private std::vector<CheckObjCMessageFunc> ObjCMessageNilCheckers
private std::vector<CheckCallFunc> PreCallCheckers
private std::vector<CheckCallFunc> PostCallCheckers
private std::vector<CheckLocationFunc> LocationCheckers
private std::vector<CheckBindFunc> BindCheckers
private std::vector<CheckEndAnalysisFunc> EndAnalysisCheckers
private std::vector<CheckBeginFunctionFunc> BeginFunctionCheckers
private std::vector<CheckEndFunctionFunc> EndFunctionCheckers
private std::vector<CheckBranchConditionFunc> BranchConditionCheckers
private std::vector<CheckNewAllocatorFunc> NewAllocatorCheckers
private std::vector<CheckLiveSymbolsFunc> LiveSymbolsCheckers
private std::vector<CheckDeadSymbolsFunc> DeadSymbolsCheckers
private std::vector<CheckRegionChangesFunc> RegionChangesCheckers
private std::vector<CheckPointerEscapeFunc> PointerEscapeCheckers
private std::vector<EvalAssumeFunc> EvalAssumeCheckers
private std::vector<EvalCallFunc> EvalCallCheckers
private std::vector<CheckEndOfTranslationUnit> EndOfTranslationUnitCheckers
private clang::ento::CheckerManager::EventsTy Events

Method Overview

  • public CheckerManager(clang::ASTContext & Context, clang::AnalyzerOptions & AOptions, const clang::Preprocessor & PP)
  • public CheckerManager(clang::AnalyzerOptions & AOptions, const clang::LangOptions & LangOpts, clang::DiagnosticsEngine & Diags, ArrayRef<std::string> plugins)
  • public CheckerManager(clang::ASTContext & Context, clang::AnalyzerOptions & AOptions, const clang::Preprocessor & PP, ArrayRef<std::string> plugins, ArrayRef<std::function<void (CheckerRegistry &)>> checkerRegistrationFns)
  • public template <typename EVENT>void _dispatchEvent(const EVENT & event) const
  • public template <typename EVENT>void _registerDispatcherForEvent()
  • public void _registerForBeginFunction(clang::ento::CheckerManager::CheckBeginFunctionFunc checkfn)
  • public void _registerForBind(clang::ento::CheckerManager::CheckBindFunc checkfn)
  • public void _registerForBody(clang::ento::CheckerManager::CheckDeclFunc checkfn)
  • public void _registerForBranchCondition(clang::ento::CheckerManager::CheckBranchConditionFunc checkfn)
  • public void _registerForConstPointerEscape(clang::ento::CheckerManager::CheckPointerEscapeFunc checkfn)
  • public void _registerForDeadSymbols(clang::ento::CheckerManager::CheckDeadSymbolsFunc checkfn)
  • public void _registerForDecl(clang::ento::CheckerManager::CheckDeclFunc checkfn, clang::ento::CheckerManager::HandlesDeclFunc isForDeclFn)
  • public void _registerForEndAnalysis(clang::ento::CheckerManager::CheckEndAnalysisFunc checkfn)
  • public void _registerForEndFunction(clang::ento::CheckerManager::CheckEndFunctionFunc checkfn)
  • public void _registerForEndOfTranslationUnit(clang::ento::CheckerManager::CheckEndOfTranslationUnit checkfn)
  • public void _registerForEvalAssume(clang::ento::CheckerManager::EvalAssumeFunc checkfn)
  • public void _registerForEvalCall(clang::ento::CheckerManager::EvalCallFunc checkfn)
  • public void _registerForLiveSymbols(clang::ento::CheckerManager::CheckLiveSymbolsFunc checkfn)
  • public void _registerForLocation(clang::ento::CheckerManager::CheckLocationFunc checkfn)
  • public void _registerForNewAllocator(clang::ento::CheckerManager::CheckNewAllocatorFunc checkfn)
  • public void _registerForObjCMessageNil(clang::ento::CheckerManager::CheckObjCMessageFunc checkfn)
  • public void _registerForPointerEscape(clang::ento::CheckerManager::CheckPointerEscapeFunc checkfn)
  • public void _registerForPostCall(clang::ento::CheckerManager::CheckCallFunc checkfn)
  • public void _registerForPostObjCMessage(clang::ento::CheckerManager::CheckObjCMessageFunc checkfn)
  • public void _registerForPostStmt(clang::ento::CheckerManager::CheckStmtFunc checkfn, clang::ento::CheckerManager::HandlesStmtFunc isForStmtFn)
  • public void _registerForPreCall(clang::ento::CheckerManager::CheckCallFunc checkfn)
  • public void _registerForPreObjCMessage(clang::ento::CheckerManager::CheckObjCMessageFunc checkfn)
  • public void _registerForPreStmt(clang::ento::CheckerManager::CheckStmtFunc checkfn, clang::ento::CheckerManager::HandlesStmtFunc isForStmtFn)
  • public void _registerForRegionChanges(clang::ento::CheckerManager::CheckRegionChangesFunc checkfn)
  • public template <typename EVENT>void _registerListenerForEvent(clang::ento::CheckerManager::CheckEventFunc checkfn)
  • private template <typename CHECKER>static void destruct(void * obj)
  • public void finishedCheckerRegistration()
  • public clang::ASTContext & getASTContext() const
  • public const clang::AnalyzerOptions & getAnalyzerOptions() const
  • private const clang::ento::CheckerManager::CachedStmtCheckers & getCachedStmtCheckersFor(const clang::Stmt * S, bool isPreVisit)
  • public template <typename CHECKER>CHECKER * getChecker()
  • public const clang::ento::CheckerRegistryData & getCheckerRegistryData() const
  • public clang::ento::CheckerNameRef getCurrentCheckerName() const
  • public clang::DiagnosticsEngine & getDiagnostics() const
  • public const clang::LangOptions & getLangOpts() const
  • private const std::vector<CheckObjCMessageFunc> & getObjCMessageCheckers(clang::ento::ObjCMessageVisitKind Kind) const
  • public const clang::Preprocessor & getPreprocessor() const
  • private template <typename T>static void * getTag()
  • public bool hasPathSensitiveCheckers() const
  • public template <typename CHECKER, typename... AT>CHECKER * registerChecker(AT &&... Args)
  • public void reportInvalidCheckerOptionValue(const clang::ento::CheckerBase * C, llvm::StringRef OptionName, llvm::StringRef ExpectedValueDesc) const
  • public void runCheckersForBeginFunction(clang::ento::ExplodedNodeSet & Dst, const clang::BlockEdge & L, clang::ento::ExplodedNode * Pred, clang::ento::ExprEngine & Eng)
  • public void runCheckersForBind(clang::ento::ExplodedNodeSet & Dst, const clang::ento::ExplodedNodeSet & Src, clang::ento::SVal location, clang::ento::SVal val, const clang::Stmt * S, clang::ento::ExprEngine & Eng, const clang::ProgramPoint & PP)
  • public void runCheckersForBranchCondition(const clang::Stmt * condition, clang::ento::ExplodedNodeSet & Dst, clang::ento::ExplodedNode * Pred, clang::ento::ExprEngine & Eng)
  • public void runCheckersForCallEvent(bool isPreVisit, clang::ento::ExplodedNodeSet & Dst, const clang::ento::ExplodedNodeSet & Src, const clang::ento::CallEvent & Call, clang::ento::ExprEngine & Eng, bool wasInlined = false)
  • public void runCheckersForDeadSymbols(clang::ento::ExplodedNodeSet & Dst, const clang::ento::ExplodedNodeSet & Src, clang::ento::SymbolReaper & SymReaper, const clang::Stmt * S, clang::ento::ExprEngine & Eng, ProgramPoint::Kind K)
  • public void runCheckersForEndAnalysis(clang::ento::ExplodedGraph & G, clang::ento::BugReporter & BR, clang::ento::ExprEngine & Eng)
  • public void runCheckersForEndFunction(clang::ento::NodeBuilderContext & BC, clang::ento::ExplodedNodeSet & Dst, clang::ento::ExplodedNode * Pred, clang::ento::ExprEngine & Eng, const clang::ReturnStmt * RS)
  • public clang::ento::ProgramStateRef runCheckersForEvalAssume(clang::ento::ProgramStateRef state, clang::ento::SVal Cond, bool Assumption)
  • public void runCheckersForEvalCall(clang::ento::ExplodedNodeSet & Dst, const clang::ento::ExplodedNodeSet & Src, const clang::ento::CallEvent & CE, clang::ento::ExprEngine & Eng, const clang::ento::EvalCallOptions & CallOpts)
  • public void runCheckersForLiveSymbols(clang::ento::ProgramStateRef state, clang::ento::SymbolReaper & SymReaper)
  • public void runCheckersForLocation(clang::ento::ExplodedNodeSet & Dst, const clang::ento::ExplodedNodeSet & Src, clang::ento::SVal location, bool isLoad, const clang::Stmt * NodeEx, const clang::Stmt * BoundEx, clang::ento::ExprEngine & Eng)
  • public void runCheckersForNewAllocator(const clang::ento::CXXAllocatorCall & Call, clang::ento::ExplodedNodeSet & Dst, clang::ento::ExplodedNode * Pred, clang::ento::ExprEngine & Eng, bool wasInlined = false)
  • public void runCheckersForObjCMessage(clang::ento::ObjCMessageVisitKind visitKind, clang::ento::ExplodedNodeSet & Dst, const clang::ento::ExplodedNodeSet & Src, const clang::ento::ObjCMethodCall & msg, clang::ento::ExprEngine & Eng, bool wasInlined = false)
  • public void runCheckersForObjCMessageNil(clang::ento::ExplodedNodeSet & Dst, const clang::ento::ExplodedNodeSet & Src, const clang::ento::ObjCMethodCall & msg, clang::ento::ExprEngine & Eng)
  • public clang::ento::ProgramStateRef runCheckersForPointerEscape(clang::ento::ProgramStateRef State, const clang::ento::InvalidatedSymbols & Escaped, const clang::ento::CallEvent * Call, clang::ento::PointerEscapeKind Kind, clang::ento::RegionAndSymbolInvalidationTraits * ITraits)
  • public void runCheckersForPostCall(clang::ento::ExplodedNodeSet & Dst, const clang::ento::ExplodedNodeSet & Src, const clang::ento::CallEvent & Call, clang::ento::ExprEngine & Eng, bool wasInlined = false)
  • public void runCheckersForPostObjCMessage(clang::ento::ExplodedNodeSet & Dst, const clang::ento::ExplodedNodeSet & Src, const clang::ento::ObjCMethodCall & msg, clang::ento::ExprEngine & Eng, bool wasInlined = false)
  • public void runCheckersForPostStmt(clang::ento::ExplodedNodeSet & Dst, const clang::ento::ExplodedNodeSet & Src, const clang::Stmt * S, clang::ento::ExprEngine & Eng, bool wasInlined = false)
  • public void runCheckersForPreCall(clang::ento::ExplodedNodeSet & Dst, const clang::ento::ExplodedNodeSet & Src, const clang::ento::CallEvent & Call, clang::ento::ExprEngine & Eng)
  • public void runCheckersForPreObjCMessage(clang::ento::ExplodedNodeSet & Dst, const clang::ento::ExplodedNodeSet & Src, const clang::ento::ObjCMethodCall & msg, clang::ento::ExprEngine & Eng)
  • public void runCheckersForPreStmt(clang::ento::ExplodedNodeSet & Dst, const clang::ento::ExplodedNodeSet & Src, const clang::Stmt * S, clang::ento::ExprEngine & Eng)
  • public void runCheckersForPrintStateJson(llvm::raw_ostream & Out, clang::ento::ProgramStateRef State, const char * NL = "\n", unsigned int Space = 0, bool IsDot = false) const
  • public clang::ento::ProgramStateRef runCheckersForRegionChanges(clang::ento::ProgramStateRef state, const clang::ento::InvalidatedSymbols * invalidated, ArrayRef<const clang::ento::MemRegion *> ExplicitRegions, ArrayRef<const clang::ento::MemRegion *> Regions, const clang::LocationContext * LCtx, const clang::ento::CallEvent * Call)
  • public void runCheckersForStmt(bool isPreVisit, clang::ento::ExplodedNodeSet & Dst, const clang::ento::ExplodedNodeSet & Src, const clang::Stmt * S, clang::ento::ExprEngine & Eng, bool wasInlined = false)
  • public void runCheckersOnASTBody(const clang::Decl * D, clang::ento::AnalysisManager & mgr, clang::ento::BugReporter & BR)
  • public void runCheckersOnASTDecl(const clang::Decl * D, clang::ento::AnalysisManager & mgr, clang::ento::BugReporter & BR)
  • public void runCheckersOnEndOfTranslationUnit(const clang::TranslationUnitDecl * TU, clang::ento::AnalysisManager & mgr, clang::ento::BugReporter & BR)
  • public void setCurrentCheckerName(clang::ento::CheckerNameRef name)
  • public ~CheckerManager()

Methods

CheckerManager(clang::ASTContext& Context,
               clang::AnalyzerOptions& AOptions,
               const clang::Preprocessor& PP)

Description

Constructs a CheckerManager that ignores all non TblGen-generated checkers. Useful for unit testing, unless the checker infrastructure itself is tested.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:150

Parameters

clang::ASTContext& Context
clang::AnalyzerOptions& AOptions
const clang::Preprocessor& PP

CheckerManager(clang::AnalyzerOptions& AOptions,
               const clang::LangOptions& LangOpts,
               clang::DiagnosticsEngine& Diags,
               ArrayRef<std::string> plugins)

Description

Constructs a CheckerManager without requiring an AST. No checker registration will take place. Only useful when one needs to print the help flags through CheckerRegistryData, and the AST is unavalaible.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:157

Parameters

clang::AnalyzerOptions& AOptions
const clang::LangOptions& LangOpts
clang::DiagnosticsEngine& Diags
ArrayRef<std::string> plugins

CheckerManager(
    clang::ASTContext& Context,
    clang::AnalyzerOptions& AOptions,
    const clang::Preprocessor& PP,
    ArrayRef<std::string> plugins,
    ArrayRef<
        std::function<void(CheckerRegistry&)>>
        checkerRegistrationFns)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:142

Parameters

clang::ASTContext& Context
clang::AnalyzerOptions& AOptions
const clang::Preprocessor& PP
ArrayRef<std::string> plugins
ArrayRef<std::function<void(CheckerRegistry&)>> checkerRegistrationFns

template <typename EVENT>
void _dispatchEvent(const EVENT& event) const

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:606

Templates

EVENT

Parameters

const EVENT& event

template <typename EVENT>
void _registerDispatcherForEvent()

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:600

Templates

EVENT

void _registerForBeginFunction(
    clang::ento::CheckerManager::
        CheckBeginFunctionFunc checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:563

Parameters

clang::ento::CheckerManager:: CheckBeginFunctionFunc checkfn

void _registerForBind(
    clang::ento::CheckerManager::CheckBindFunc
        checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:559

Parameters

clang::ento::CheckerManager::CheckBindFunc checkfn

void _registerForBody(
    clang::ento::CheckerManager::CheckDeclFunc
        checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:477

Parameters

clang::ento::CheckerManager::CheckDeclFunc checkfn

void _registerForBranchCondition(
    clang::ento::CheckerManager::
        CheckBranchConditionFunc checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:566

Parameters

clang::ento::CheckerManager:: CheckBranchConditionFunc checkfn

void _registerForConstPointerEscape(
    clang::ento::CheckerManager::
        CheckPointerEscapeFunc checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:578

Parameters

clang::ento::CheckerManager:: CheckPointerEscapeFunc checkfn

void _registerForDeadSymbols(
    clang::ento::CheckerManager::
        CheckDeadSymbolsFunc checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:572

Parameters

clang::ento::CheckerManager::CheckDeadSymbolsFunc checkfn

void _registerForDecl(
    clang::ento::CheckerManager::CheckDeclFunc
        checkfn,
    clang::ento::CheckerManager::HandlesDeclFunc
        isForDeclFn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:475

Parameters

clang::ento::CheckerManager::CheckDeclFunc checkfn
clang::ento::CheckerManager::HandlesDeclFunc isForDeclFn

void _registerForEndAnalysis(
    clang::ento::CheckerManager::
        CheckEndAnalysisFunc checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:561

Parameters

clang::ento::CheckerManager::CheckEndAnalysisFunc checkfn

void _registerForEndFunction(
    clang::ento::CheckerManager::
        CheckEndFunctionFunc checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:564

Parameters

clang::ento::CheckerManager::CheckEndFunctionFunc checkfn

void _registerForEndOfTranslationUnit(
    clang::ento::CheckerManager::
        CheckEndOfTranslationUnit checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:584

Parameters

clang::ento::CheckerManager:: CheckEndOfTranslationUnit checkfn

void _registerForEvalAssume(
    clang::ento::CheckerManager::EvalAssumeFunc
        checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:580

Parameters

clang::ento::CheckerManager::EvalAssumeFunc checkfn

void _registerForEvalCall(
    clang::ento::CheckerManager::EvalCallFunc
        checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:582

Parameters

clang::ento::CheckerManager::EvalCallFunc checkfn

void _registerForLiveSymbols(
    clang::ento::CheckerManager::
        CheckLiveSymbolsFunc checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:570

Parameters

clang::ento::CheckerManager::CheckLiveSymbolsFunc checkfn

void _registerForLocation(
    clang::ento::CheckerManager::CheckLocationFunc
        checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:557

Parameters

clang::ento::CheckerManager::CheckLocationFunc checkfn

void _registerForNewAllocator(
    clang::ento::CheckerManager::
        CheckNewAllocatorFunc checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:568

Parameters

clang::ento::CheckerManager::CheckNewAllocatorFunc checkfn

void _registerForObjCMessageNil(
    clang::ento::CheckerManager::
        CheckObjCMessageFunc checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:552

Parameters

clang::ento::CheckerManager::CheckObjCMessageFunc checkfn

void _registerForPointerEscape(
    clang::ento::CheckerManager::
        CheckPointerEscapeFunc checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:576

Parameters

clang::ento::CheckerManager:: CheckPointerEscapeFunc checkfn

void _registerForPostCall(
    clang::ento::CheckerManager::CheckCallFunc
        checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:555

Parameters

clang::ento::CheckerManager::CheckCallFunc checkfn

void _registerForPostObjCMessage(
    clang::ento::CheckerManager::
        CheckObjCMessageFunc checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:550

Parameters

clang::ento::CheckerManager::CheckObjCMessageFunc checkfn

void _registerForPostStmt(
    clang::ento::CheckerManager::CheckStmtFunc
        checkfn,
    clang::ento::CheckerManager::HandlesStmtFunc
        isForStmtFn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:546

Parameters

clang::ento::CheckerManager::CheckStmtFunc checkfn
clang::ento::CheckerManager::HandlesStmtFunc isForStmtFn

void _registerForPreCall(
    clang::ento::CheckerManager::CheckCallFunc
        checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:554

Parameters

clang::ento::CheckerManager::CheckCallFunc checkfn

void _registerForPreObjCMessage(
    clang::ento::CheckerManager::
        CheckObjCMessageFunc checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:549

Parameters

clang::ento::CheckerManager::CheckObjCMessageFunc checkfn

void _registerForPreStmt(
    clang::ento::CheckerManager::CheckStmtFunc
        checkfn,
    clang::ento::CheckerManager::HandlesStmtFunc
        isForStmtFn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:544

Parameters

clang::ento::CheckerManager::CheckStmtFunc checkfn
clang::ento::CheckerManager::HandlesStmtFunc isForStmtFn

void _registerForRegionChanges(
    clang::ento::CheckerManager::
        CheckRegionChangesFunc checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:574

Parameters

clang::ento::CheckerManager:: CheckRegionChangesFunc checkfn

template <typename EVENT>
void _registerListenerForEvent(
    clang::ento::CheckerManager::CheckEventFunc
        checkfn)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:594

Templates

EVENT

Parameters

clang::ento::CheckerManager::CheckEventFunc checkfn

template <typename CHECKER>
static void destruct(void* obj)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:621

Templates

CHECKER

Parameters

void* obj

void finishedCheckerRegistration()

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:167

clang::ASTContext& getASTContext() const

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:179

const clang::AnalyzerOptions& getAnalyzerOptions()
    const

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:170

const clang::ento::CheckerManager::
    CachedStmtCheckers&
    getCachedStmtCheckersFor(const clang::Stmt* S,
                             bool isPreVisit)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:653

Parameters

const clang::Stmt* S
bool isPreVisit

template <typename CHECKER>
CHECKER* getChecker()

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:218

Templates

CHECKER

const clang::ento::CheckerRegistryData&
getCheckerRegistryData() const

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:175

clang::ento::CheckerNameRef
getCurrentCheckerName() const

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:163

clang::DiagnosticsEngine& getDiagnostics() const

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:178

const clang::LangOptions& getLangOpts() const

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:169

const std::vector<CheckObjCMessageFunc>&
getObjCMessageCheckers(
    clang::ento::ObjCMessageVisitKind Kind) const

Description

Returns the checkers that have registered for callbacks of the given \p Kind.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:659

Parameters

clang::ento::ObjCMessageVisitKind Kind

const clang::Preprocessor& getPreprocessor() const

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:171

template <typename T>
static void* getTag()

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:624

Templates

T

bool hasPathSensitiveCheckers() const

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:165

template <typename CHECKER, typename... AT>
CHECKER* registerChecker(AT&&... Args)

Description

Used to register checkers. All arguments are automatically passed through to the checker constructor.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:204

Templates

CHECKER
AT

Parameters

AT&&... Args

Returns

a pointer to the checker object.

void reportInvalidCheckerOptionValue(
    const clang::ento::CheckerBase* C,
    llvm::StringRef OptionName,
    llvm::StringRef ExpectedValueDesc) const

Description

Emits an error through a DiagnosticsEngine about an invalid user supplied checker option value.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:186

Parameters

const clang::ento::CheckerBase* C
llvm::StringRef OptionName
llvm::StringRef ExpectedValueDesc

void runCheckersForBeginFunction(
    clang::ento::ExplodedNodeSet& Dst,
    const clang::BlockEdge& L,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExprEngine& Eng)

Description

Run checkers on beginning of function.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:350

Parameters

clang::ento::ExplodedNodeSet& Dst
const clang::BlockEdge& L
clang::ento::ExplodedNode* Pred
clang::ento::ExprEngine& Eng

void runCheckersForBind(
    clang::ento::ExplodedNodeSet& Dst,
    const clang::ento::ExplodedNodeSet& Src,
    clang::ento::SVal location,
    clang::ento::SVal val,
    const clang::Stmt* S,
    clang::ento::ExprEngine& Eng,
    const clang::ProgramPoint& PP)

Description

Run checkers for binding of a value to a location.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:339

Parameters

clang::ento::ExplodedNodeSet& Dst
const clang::ento::ExplodedNodeSet& Src
clang::ento::SVal location
clang::ento::SVal val
const clang::Stmt* S
clang::ento::ExprEngine& Eng
const clang::ProgramPoint& PP

void runCheckersForBranchCondition(
    const clang::Stmt* condition,
    clang::ento::ExplodedNodeSet& Dst,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExprEngine& Eng)

Description

Run checkers for branch condition.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:363

Parameters

const clang::Stmt* condition
clang::ento::ExplodedNodeSet& Dst
clang::ento::ExplodedNode* Pred
clang::ento::ExprEngine& Eng

void runCheckersForCallEvent(
    bool isPreVisit,
    clang::ento::ExplodedNodeSet& Dst,
    const clang::ento::ExplodedNodeSet& Src,
    const clang::ento::CallEvent& Call,
    clang::ento::ExprEngine& Eng,
    bool wasInlined = false)

Description

Run checkers for visiting obj-c messages.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:324

Parameters

bool isPreVisit
clang::ento::ExplodedNodeSet& Dst
const clang::ento::ExplodedNodeSet& Src
const clang::ento::CallEvent& Call
clang::ento::ExprEngine& Eng
bool wasInlined = false

void runCheckersForDeadSymbols(
    clang::ento::ExplodedNodeSet& Dst,
    const clang::ento::ExplodedNodeSet& Src,
    clang::ento::SymbolReaper& SymReaper,
    const clang::Stmt* S,
    clang::ento::ExprEngine& Eng,
    ProgramPoint::Kind K)

Description

Run checkers for dead symbols. Notifies checkers when symbols become dead. For example, this allows checkers to aggressively clean up/reduce the checker state and produce precise diagnostics.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:385

Parameters

clang::ento::ExplodedNodeSet& Dst
const clang::ento::ExplodedNodeSet& Src
clang::ento::SymbolReaper& SymReaper
const clang::Stmt* S
clang::ento::ExprEngine& Eng
ProgramPoint::Kind K

void runCheckersForEndAnalysis(
    clang::ento::ExplodedGraph& G,
    clang::ento::BugReporter& BR,
    clang::ento::ExprEngine& Eng)

Description

Run checkers for end of analysis.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:346

Parameters

clang::ento::ExplodedGraph& G
clang::ento::BugReporter& BR
clang::ento::ExprEngine& Eng

void runCheckersForEndFunction(
    clang::ento::NodeBuilderContext& BC,
    clang::ento::ExplodedNodeSet& Dst,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExprEngine& Eng,
    const clang::ReturnStmt* RS)

Description

Run checkers on end of function.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:356

Parameters

clang::ento::NodeBuilderContext& BC
clang::ento::ExplodedNodeSet& Dst
clang::ento::ExplodedNode* Pred
clang::ento::ExprEngine& Eng
const clang::ReturnStmt* RS

clang::ento::ProgramStateRef
runCheckersForEvalAssume(
    clang::ento::ProgramStateRef state,
    clang::ento::SVal Cond,
    bool Assumption)

Description

Run checkers for handling assumptions on symbolic values.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:433

Parameters

clang::ento::ProgramStateRef state
clang::ento::SVal Cond
bool Assumption

void runCheckersForEvalCall(
    clang::ento::ExplodedNodeSet& Dst,
    const clang::ento::ExplodedNodeSet& Src,
    const clang::ento::CallEvent& CE,
    clang::ento::ExprEngine& Eng,
    const clang::ento::EvalCallOptions& CallOpts)

Description

Run checkers for evaluating a call. Warning: Currently, the CallEvent MUST come from a CallExpr!

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:439

Parameters

clang::ento::ExplodedNodeSet& Dst
const clang::ento::ExplodedNodeSet& Src
const clang::ento::CallEvent& CE
clang::ento::ExprEngine& Eng
const clang::ento::EvalCallOptions& CallOpts

void runCheckersForLiveSymbols(
    clang::ento::ProgramStateRef state,
    clang::ento::SymbolReaper& SymReaper)

Description

Run checkers for live symbols. Allows modifying SymbolReaper object. For example, checkers can explicitly register symbols of interest as live. These symbols will not be marked dead and removed.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:377

Parameters

clang::ento::ProgramStateRef state
clang::ento::SymbolReaper& SymReaper

void runCheckersForLocation(
    clang::ento::ExplodedNodeSet& Dst,
    const clang::ento::ExplodedNodeSet& Src,
    clang::ento::SVal location,
    bool isLoad,
    const clang::Stmt* NodeEx,
    const clang::Stmt* BoundEx,
    clang::ento::ExprEngine& Eng)

Description

Run checkers for load/store of a location.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:330

Parameters

clang::ento::ExplodedNodeSet& Dst
const clang::ento::ExplodedNodeSet& Src
clang::ento::SVal location
bool isLoad
const clang::Stmt* NodeEx
const clang::Stmt* BoundEx
clang::ento::ExprEngine& Eng

void runCheckersForNewAllocator(
    const clang::ento::CXXAllocatorCall& Call,
    clang::ento::ExplodedNodeSet& Dst,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExprEngine& Eng,
    bool wasInlined = false)

Description

Run checkers between C++ operator new and constructor calls.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:368

Parameters

const clang::ento::CXXAllocatorCall& Call
clang::ento::ExplodedNodeSet& Dst
clang::ento::ExplodedNode* Pred
clang::ento::ExprEngine& Eng
bool wasInlined = false

void runCheckersForObjCMessage(
    clang::ento::ObjCMessageVisitKind visitKind,
    clang::ento::ExplodedNodeSet& Dst,
    const clang::ento::ExplodedNodeSet& Src,
    const clang::ento::ObjCMethodCall& msg,
    clang::ento::ExprEngine& Eng,
    bool wasInlined = false)

Description

Run checkers for visiting obj-c messages.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:303

Parameters

clang::ento::ObjCMessageVisitKind visitKind
clang::ento::ExplodedNodeSet& Dst
const clang::ento::ExplodedNodeSet& Src
const clang::ento::ObjCMethodCall& msg
clang::ento::ExprEngine& Eng
bool wasInlined = false

void runCheckersForObjCMessageNil(
    clang::ento::ExplodedNodeSet& Dst,
    const clang::ento::ExplodedNodeSet& Src,
    const clang::ento::ObjCMethodCall& msg,
    clang::ento::ExprEngine& Eng)

Description

Run checkers for visiting an obj-c message to nil.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:294

Parameters

clang::ento::ExplodedNodeSet& Dst
const clang::ento::ExplodedNodeSet& Src
const clang::ento::ObjCMethodCall& msg
clang::ento::ExprEngine& Eng

clang::ento::ProgramStateRef
runCheckersForPointerEscape(
    clang::ento::ProgramStateRef State,
    const clang::ento::InvalidatedSymbols&
        Escaped,
    const clang::ento::CallEvent* Call,
    clang::ento::PointerEscapeKind Kind,
    clang::ento::
        RegionAndSymbolInvalidationTraits*
            ITraits)

Description

Run checkers when pointers escape. This notifies the checkers about pointer escape, which occurs whenever the analyzer cannot track the symbol any more. For example, as a result of assigning a pointer into a global or when it's passed to a function call the analyzer cannot model.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:426

Parameters

clang::ento::ProgramStateRef State
The state at the point of escape.
const clang::ento::InvalidatedSymbols& Escaped
The list of escaped symbols.
const clang::ento::CallEvent* Call
The corresponding CallEvent, if the symbols escape as parameters to the given call.
clang::ento::PointerEscapeKind Kind
The reason of pointer escape.
clang::ento::RegionAndSymbolInvalidationTraits* ITraits
Information about invalidation for a particular region/symbol.

Returns

Checkers can modify the state by returning a new one.

void runCheckersForPostCall(
    clang::ento::ExplodedNodeSet& Dst,
    const clang::ento::ExplodedNodeSet& Src,
    const clang::ento::CallEvent& Call,
    clang::ento::ExprEngine& Eng,
    bool wasInlined = false)

Description

Run checkers for post-visiting obj-c messages.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:316

Parameters

clang::ento::ExplodedNodeSet& Dst
const clang::ento::ExplodedNodeSet& Src
const clang::ento::CallEvent& Call
clang::ento::ExprEngine& Eng
bool wasInlined = false

void runCheckersForPostObjCMessage(
    clang::ento::ExplodedNodeSet& Dst,
    const clang::ento::ExplodedNodeSet& Src,
    const clang::ento::ObjCMethodCall& msg,
    clang::ento::ExprEngine& Eng,
    bool wasInlined = false)

Description

Run checkers for post-visiting obj-c messages.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:284

Parameters

clang::ento::ExplodedNodeSet& Dst
const clang::ento::ExplodedNodeSet& Src
const clang::ento::ObjCMethodCall& msg
clang::ento::ExprEngine& Eng
bool wasInlined = false

void runCheckersForPostStmt(
    clang::ento::ExplodedNodeSet& Dst,
    const clang::ento::ExplodedNodeSet& Src,
    const clang::Stmt* S,
    clang::ento::ExprEngine& Eng,
    bool wasInlined = false)

Description

Run checkers for post-visiting Stmts. The notification is performed for every explored CFGElement, which does not include the control flow statements such as IfStmt.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:261

Parameters

clang::ento::ExplodedNodeSet& Dst
const clang::ento::ExplodedNodeSet& Src
const clang::Stmt* S
clang::ento::ExprEngine& Eng
bool wasInlined = false

void runCheckersForPreCall(
    clang::ento::ExplodedNodeSet& Dst,
    const clang::ento::ExplodedNodeSet& Src,
    const clang::ento::CallEvent& Call,
    clang::ento::ExprEngine& Eng)

Description

Run checkers for pre-visiting obj-c messages.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:310

Parameters

clang::ento::ExplodedNodeSet& Dst
const clang::ento::ExplodedNodeSet& Src
const clang::ento::CallEvent& Call
clang::ento::ExprEngine& Eng

void runCheckersForPreObjCMessage(
    clang::ento::ExplodedNodeSet& Dst,
    const clang::ento::ExplodedNodeSet& Src,
    const clang::ento::ObjCMethodCall& msg,
    clang::ento::ExprEngine& Eng)

Description

Run checkers for pre-visiting obj-c messages.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:276

Parameters

clang::ento::ExplodedNodeSet& Dst
const clang::ento::ExplodedNodeSet& Src
const clang::ento::ObjCMethodCall& msg
clang::ento::ExprEngine& Eng

void runCheckersForPreStmt(
    clang::ento::ExplodedNodeSet& Dst,
    const clang::ento::ExplodedNodeSet& Src,
    const clang::Stmt* S,
    clang::ento::ExprEngine& Eng)

Description

Run checkers for pre-visiting Stmts. The notification is performed for every explored CFGElement, which does not include the control flow statements such as IfStmt.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:248

Parameters

clang::ento::ExplodedNodeSet& Dst
const clang::ento::ExplodedNodeSet& Src
const clang::Stmt* S
clang::ento::ExprEngine& Eng

void runCheckersForPrintStateJson(
    llvm::raw_ostream& Out,
    clang::ento::ProgramStateRef State,
    const char* NL = "\n",
    unsigned int Space = 0,
    bool IsDot = false) const

Description

Run checkers for debug-printing a ProgramState. Unlike most other callbacks, any checker can simply implement the virtual method CheckerBase::printState if it has custom data to print.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:458

Parameters

llvm::raw_ostream& Out
The output stream
clang::ento::ProgramStateRef State
The state being printed
const char* NL = "\n"
The preferred representation of a newline.
unsigned int Space = 0
The preferred space between the left side and the message.
bool IsDot = false
Whether the message will be printed in 'dot' format.

clang::ento::ProgramStateRef
runCheckersForRegionChanges(
    clang::ento::ProgramStateRef state,
    const clang::ento::InvalidatedSymbols*
        invalidated,
    ArrayRef<const clang::ento::MemRegion*>
        ExplicitRegions,
    ArrayRef<const clang::ento::MemRegion*>
        Regions,
    const clang::LocationContext* LCtx,
    const clang::ento::CallEvent* Call)

Description

Run checkers for region changes. This corresponds to the check::RegionChanges callback.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:403

Parameters

clang::ento::ProgramStateRef state
The current program state.
const clang::ento::InvalidatedSymbols* invalidated
A set of all symbols potentially touched by the change.
ArrayRef<const clang::ento::MemRegion*> ExplicitRegions
The regions explicitly requested for invalidation. For example, in the case of a function call, these would be arguments.
ArrayRef<const clang::ento::MemRegion*> Regions
The transitive closure of accessible regions, i.e. all regions that may have been touched by this change.
const clang::LocationContext* LCtx
const clang::ento::CallEvent* Call
The call expression wrapper if the regions are invalidated by a call.

void runCheckersForStmt(
    bool isPreVisit,
    clang::ento::ExplodedNodeSet& Dst,
    const clang::ento::ExplodedNodeSet& Src,
    const clang::Stmt* S,
    clang::ento::ExprEngine& Eng,
    bool wasInlined = false)

Description

Run checkers for visiting Stmts.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:270

Parameters

bool isPreVisit
clang::ento::ExplodedNodeSet& Dst
const clang::ento::ExplodedNodeSet& Src
const clang::Stmt* S
clang::ento::ExprEngine& Eng
bool wasInlined = false

void runCheckersOnASTBody(
    const clang::Decl* D,
    clang::ento::AnalysisManager& mgr,
    clang::ento::BugReporter& BR)

Description

Run checkers handling Decls containing a Stmt body.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:235

Parameters

const clang::Decl* D
clang::ento::AnalysisManager& mgr
clang::ento::BugReporter& BR

void runCheckersOnASTDecl(
    const clang::Decl* D,
    clang::ento::AnalysisManager& mgr,
    clang::ento::BugReporter& BR)

Description

Run checkers handling Decls.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:231

Parameters

const clang::Decl* D
clang::ento::AnalysisManager& mgr
clang::ento::BugReporter& BR

void runCheckersOnEndOfTranslationUnit(
    const clang::TranslationUnitDecl* TU,
    clang::ento::AnalysisManager& mgr,
    clang::ento::BugReporter& BR)

Description

Run checkers for the entire Translation Unit.

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:444

Parameters

const clang::TranslationUnitDecl* TU
clang::ento::AnalysisManager& mgr
clang::ento::BugReporter& BR

void setCurrentCheckerName(
    clang::ento::CheckerNameRef name)

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:162

Parameters

clang::ento::CheckerNameRef name

~CheckerManager()

Declared at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:160