clang  6.0.0svn
Classes | Public Types | Public Member Functions | List of all members
clang::ento::CheckerManager Class Reference

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

Public Types

typedef CheckerBaseCheckerRef
 
typedef const void * CheckerTag
 
typedef CheckerFn< void()> CheckerDtor
 
typedef CheckerFn< void(const Decl *, AnalysisManager &, BugReporter &)> CheckDeclFunc
 
typedef bool(* HandlesDeclFunc) (const Decl *D)
 
typedef CheckerFn< void(const Stmt *, CheckerContext &)> CheckStmtFunc
 
typedef CheckerFn< void(const ObjCMethodCall &, CheckerContext &)> CheckObjCMessageFunc
 
typedef CheckerFn< void(const CallEvent &, CheckerContext &)> CheckCallFunc
 
typedef CheckerFn< void(const SVal &location, bool isLoad, const Stmt *S, CheckerContext &)> CheckLocationFunc
 
typedef CheckerFn< void(const SVal &location, const SVal &val, const Stmt *S, CheckerContext &)> CheckBindFunc
 
typedef CheckerFn< void(ExplodedGraph &, BugReporter &, ExprEngine &)> CheckEndAnalysisFunc
 
typedef CheckerFn< void(CheckerContext &)> CheckBeginFunctionFunc
 
typedef CheckerFn< void(CheckerContext &)> CheckEndFunctionFunc
 
typedef CheckerFn< void(const Stmt *, CheckerContext &)> CheckBranchConditionFunc
 
typedef CheckerFn< void(SymbolReaper &, CheckerContext &)> CheckDeadSymbolsFunc
 
typedef CheckerFn< void(ProgramStateRef, SymbolReaper &)> CheckLiveSymbolsFunc
 
typedef CheckerFn< ProgramStateRef(ProgramStateRef, const InvalidatedSymbols *symbols, ArrayRef< const MemRegion * > ExplicitRegions, ArrayRef< const MemRegion * > Regions, const LocationContext *LCtx, const CallEvent *Call)> CheckRegionChangesFunc
 
typedef CheckerFn< ProgramStateRef(ProgramStateRef, const InvalidatedSymbols &Escaped, const CallEvent *Call, PointerEscapeKind Kind, RegionAndSymbolInvalidationTraits *ITraits)> CheckPointerEscapeFunc
 
typedef CheckerFn< ProgramStateRef(ProgramStateRef, const SVal &cond, bool assumption)> EvalAssumeFunc
 
typedef CheckerFn< bool(const CallExpr *, CheckerContext &)> EvalCallFunc
 
typedef CheckerFn< void(const TranslationUnitDecl *, AnalysisManager &, BugReporter &)> CheckEndOfTranslationUnit
 
typedef bool(* HandlesStmtFunc) (const Stmt *D)
 
typedef void * EventTag
 
typedef CheckerFn< void(const void *event)> CheckEventFunc
 

Public Member Functions

 CheckerManager (const LangOptions &langOpts, AnalyzerOptions &AOptions)
 
 ~CheckerManager ()
 
void setCurrentCheckName (CheckName name)
 
CheckName getCurrentCheckName () const
 
bool hasPathSensitiveCheckers () const
 
void finishedCheckerRegistration ()
 
const LangOptionsgetLangOpts () const
 
AnalyzerOptionsgetAnalyzerOptions ()
 
template<typename CHECKER >
CHECKERregisterChecker ()
 Used to register checkers. More...
 
template<typename CHECKER >
CHECKERregisterChecker (AnalyzerOptions &AOpts)
 
void runCheckersOnASTDecl (const Decl *D, AnalysisManager &mgr, BugReporter &BR)
 Run checkers handling Decls. More...
 
void runCheckersOnASTBody (const Decl *D, AnalysisManager &mgr, BugReporter &BR)
 Run checkers handling Decls containing a Stmt body. More...
 
void runCheckersForPreStmt (ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const Stmt *S, ExprEngine &Eng)
 Run checkers for pre-visiting Stmts. More...
 
void runCheckersForPostStmt (ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const Stmt *S, ExprEngine &Eng, bool wasInlined=false)
 Run checkers for post-visiting Stmts. More...
 
void runCheckersForStmt (bool isPreVisit, ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const Stmt *S, ExprEngine &Eng, bool wasInlined=false)
 Run checkers for visiting Stmts. More...
 
void runCheckersForPreObjCMessage (ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const ObjCMethodCall &msg, ExprEngine &Eng)
 Run checkers for pre-visiting obj-c messages. More...
 
void runCheckersForPostObjCMessage (ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const ObjCMethodCall &msg, ExprEngine &Eng, bool wasInlined=false)
 Run checkers for post-visiting obj-c messages. More...
 
void runCheckersForObjCMessageNil (ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const ObjCMethodCall &msg, ExprEngine &Eng)
 Run checkers for visiting an obj-c message to nil. More...
 
void runCheckersForObjCMessage (ObjCMessageVisitKind visitKind, ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const ObjCMethodCall &msg, ExprEngine &Eng, bool wasInlined=false)
 Run checkers for visiting obj-c messages. More...
 
void runCheckersForPreCall (ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const CallEvent &Call, ExprEngine &Eng)
 Run checkers for pre-visiting obj-c messages. More...
 
void runCheckersForPostCall (ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const CallEvent &Call, ExprEngine &Eng, bool wasInlined=false)
 Run checkers for post-visiting obj-c messages. More...
 
void runCheckersForCallEvent (bool isPreVisit, ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const CallEvent &Call, ExprEngine &Eng, bool wasInlined=false)
 Run checkers for visiting obj-c messages. More...
 
void runCheckersForLocation (ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, SVal location, bool isLoad, const Stmt *NodeEx, const Stmt *BoundEx, ExprEngine &Eng)
 Run checkers for load/store of a location. More...
 
void runCheckersForBind (ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, SVal location, SVal val, const Stmt *S, ExprEngine &Eng, const ProgramPoint &PP)
 Run checkers for binding of a value to a location. More...
 
void runCheckersForEndAnalysis (ExplodedGraph &G, BugReporter &BR, ExprEngine &Eng)
 Run checkers for end of analysis. More...
 
void runCheckersForBeginFunction (ExplodedNodeSet &Dst, const BlockEdge &L, ExplodedNode *Pred, ExprEngine &Eng)
 Run checkers on beginning of function. More...
 
void runCheckersForEndFunction (NodeBuilderContext &BC, ExplodedNodeSet &Dst, ExplodedNode *Pred, ExprEngine &Eng)
 Run checkers on end of function. More...
 
void runCheckersForBranchCondition (const Stmt *condition, ExplodedNodeSet &Dst, ExplodedNode *Pred, ExprEngine &Eng)
 Run checkers for branch condition. More...
 
void runCheckersForLiveSymbols (ProgramStateRef state, SymbolReaper &SymReaper)
 Run checkers for live symbols. More...
 
void runCheckersForDeadSymbols (ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, SymbolReaper &SymReaper, const Stmt *S, ExprEngine &Eng, ProgramPoint::Kind K)
 Run checkers for dead symbols. More...
 
ProgramStateRef runCheckersForRegionChanges (ProgramStateRef state, const InvalidatedSymbols *invalidated, ArrayRef< const MemRegion *> ExplicitRegions, ArrayRef< const MemRegion *> Regions, const LocationContext *LCtx, const CallEvent *Call)
 Run checkers for region changes. More...
 
ProgramStateRef runCheckersForPointerEscape (ProgramStateRef State, const InvalidatedSymbols &Escaped, const CallEvent *Call, PointerEscapeKind Kind, RegionAndSymbolInvalidationTraits *ITraits)
 Run checkers when pointers escape. More...
 
ProgramStateRef runCheckersForEvalAssume (ProgramStateRef state, SVal Cond, bool Assumption)
 Run checkers for handling assumptions on symbolic values. More...
 
void runCheckersForEvalCall (ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const CallEvent &CE, ExprEngine &Eng)
 Run checkers for evaluating a call. More...
 
void runCheckersOnEndOfTranslationUnit (const TranslationUnitDecl *TU, AnalysisManager &mgr, BugReporter &BR)
 Run checkers for the entire Translation Unit. More...
 
void runCheckersForPrintState (raw_ostream &Out, ProgramStateRef State, const char *NL, const char *Sep)
 Run checkers for debug-printing a ProgramState. More...
 
void _registerForDecl (CheckDeclFunc checkfn, HandlesDeclFunc isForDeclFn)
 
void _registerForBody (CheckDeclFunc checkfn)
 
void _registerForPreStmt (CheckStmtFunc checkfn, HandlesStmtFunc isForStmtFn)
 
void _registerForPostStmt (CheckStmtFunc checkfn, HandlesStmtFunc isForStmtFn)
 
void _registerForPreObjCMessage (CheckObjCMessageFunc checkfn)
 
void _registerForPostObjCMessage (CheckObjCMessageFunc checkfn)
 
void _registerForObjCMessageNil (CheckObjCMessageFunc checkfn)
 
void _registerForPreCall (CheckCallFunc checkfn)
 
void _registerForPostCall (CheckCallFunc checkfn)
 
void _registerForLocation (CheckLocationFunc checkfn)
 
void _registerForBind (CheckBindFunc checkfn)
 
void _registerForEndAnalysis (CheckEndAnalysisFunc checkfn)
 
void _registerForBeginFunction (CheckEndFunctionFunc checkfn)
 
void _registerForEndFunction (CheckEndFunctionFunc checkfn)
 
void _registerForBranchCondition (CheckBranchConditionFunc checkfn)
 
void _registerForLiveSymbols (CheckLiveSymbolsFunc checkfn)
 
void _registerForDeadSymbols (CheckDeadSymbolsFunc checkfn)
 
void _registerForRegionChanges (CheckRegionChangesFunc checkfn)
 
void _registerForPointerEscape (CheckPointerEscapeFunc checkfn)
 
void _registerForConstPointerEscape (CheckPointerEscapeFunc checkfn)
 
void _registerForEvalAssume (EvalAssumeFunc checkfn)
 
void _registerForEvalCall (EvalCallFunc checkfn)
 
void _registerForEndOfTranslationUnit (CheckEndOfTranslationUnit checkfn)
 
template<typename EVENT >
void _registerListenerForEvent (CheckEventFunc checkfn)
 
template<typename EVENT >
void _registerDispatcherForEvent ()
 
template<typename EVENT >
void _dispatchEvent (const EVENT &event) const
 

Detailed Description

Definition at line 103 of file CheckerManager.h.

Member Typedef Documentation

◆ CheckBeginFunctionFunc

Definition at line 433 of file CheckerManager.h.

◆ CheckBindFunc

typedef CheckerFn<void (const SVal &location, const SVal &val, const Stmt *S, CheckerContext &)> clang::ento::CheckerManager::CheckBindFunc

Definition at line 427 of file CheckerManager.h.

◆ CheckBranchConditionFunc

Definition at line 439 of file CheckerManager.h.

◆ CheckCallFunc

Definition at line 418 of file CheckerManager.h.

◆ CheckDeadSymbolsFunc

Definition at line 442 of file CheckerManager.h.

◆ CheckDeclFunc

Definition at line 401 of file CheckerManager.h.

◆ CheckEndAnalysisFunc

Definition at line 430 of file CheckerManager.h.

◆ CheckEndFunctionFunc

Definition at line 436 of file CheckerManager.h.

◆ CheckEndOfTranslationUnit

Definition at line 470 of file CheckerManager.h.

◆ CheckerDtor

Definition at line 126 of file CheckerManager.h.

◆ CheckerRef

Definition at line 124 of file CheckerManager.h.

◆ CheckerTag

Definition at line 125 of file CheckerManager.h.

◆ CheckEventFunc

typedef CheckerFn<void (const void *event)> clang::ento::CheckerManager::CheckEventFunc

Definition at line 518 of file CheckerManager.h.

◆ CheckLiveSymbolsFunc

Definition at line 444 of file CheckerManager.h.

◆ CheckLocationFunc

typedef CheckerFn<void (const SVal &location, bool isLoad, const Stmt *S, CheckerContext &)> clang::ento::CheckerManager::CheckLocationFunc

Definition at line 423 of file CheckerManager.h.

◆ CheckObjCMessageFunc

Definition at line 415 of file CheckerManager.h.

◆ CheckPointerEscapeFunc

Definition at line 459 of file CheckerManager.h.

◆ CheckRegionChangesFunc

Definition at line 452 of file CheckerManager.h.

◆ CheckStmtFunc

Definition at line 412 of file CheckerManager.h.

◆ EvalAssumeFunc

Definition at line 463 of file CheckerManager.h.

◆ EvalCallFunc

Definition at line 466 of file CheckerManager.h.

◆ EventTag

Definition at line 517 of file CheckerManager.h.

◆ HandlesDeclFunc

typedef bool(* clang::ento::CheckerManager::HandlesDeclFunc) (const Decl *D)

Definition at line 403 of file CheckerManager.h.

◆ HandlesStmtFunc

typedef bool(* clang::ento::CheckerManager::HandlesStmtFunc) (const Stmt *D)

Definition at line 472 of file CheckerManager.h.

Constructor & Destructor Documentation

◆ CheckerManager()

clang::ento::CheckerManager::CheckerManager ( const LangOptions langOpts,
AnalyzerOptions AOptions 
)
inline

Definition at line 109 of file CheckerManager.h.

◆ ~CheckerManager()

CheckerManager::~CheckerManager ( )

Definition at line 771 of file CheckerManager.cpp.

Member Function Documentation

◆ _dispatchEvent()

template<typename EVENT >
void clang::ento::CheckerManager::_dispatchEvent ( const EVENT &  event) const
inline

◆ _registerDispatcherForEvent()

template<typename EVENT >
void clang::ento::CheckerManager::_registerDispatcherForEvent ( )
inline

Definition at line 527 of file CheckerManager.h.

Referenced by clang::ento::EventDispatcher< EVENT >::_register().

◆ _registerForBeginFunction()

void CheckerManager::_registerForBeginFunction ( CheckEndFunctionFunc  checkfn)

Definition at line 701 of file CheckerManager.cpp.

Referenced by clang::ento::check::BeginFunction::_register().

◆ _registerForBind()

void CheckerManager::_registerForBind ( CheckBindFunc  checkfn)

Definition at line 693 of file CheckerManager.cpp.

Referenced by clang::ento::check::Bind::_register().

◆ _registerForBody()

void CheckerManager::_registerForBody ( CheckDeclFunc  checkfn)

Definition at line 651 of file CheckerManager.cpp.

Referenced by clang::ento::check::ASTCodeBody::_register().

◆ _registerForBranchCondition()

void CheckerManager::_registerForBranchCondition ( CheckBranchConditionFunc  checkfn)

Definition at line 709 of file CheckerManager.cpp.

Referenced by clang::ento::check::BranchCondition::_register().

◆ _registerForConstPointerEscape()

void CheckerManager::_registerForConstPointerEscape ( CheckPointerEscapeFunc  checkfn)

Definition at line 730 of file CheckerManager.cpp.

◆ _registerForDeadSymbols()

void CheckerManager::_registerForDeadSymbols ( CheckDeadSymbolsFunc  checkfn)

Definition at line 718 of file CheckerManager.cpp.

Referenced by clang::ento::check::DeadSymbols::_register().

◆ _registerForDecl()

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

Definition at line 645 of file CheckerManager.cpp.

Referenced by clang::ento::check::ASTDecl< DECL >::_register().

◆ _registerForEndAnalysis()

void CheckerManager::_registerForEndAnalysis ( CheckEndAnalysisFunc  checkfn)

Definition at line 697 of file CheckerManager.cpp.

Referenced by clang::ento::check::EndAnalysis::_register().

◆ _registerForEndFunction()

void CheckerManager::_registerForEndFunction ( CheckEndFunctionFunc  checkfn)

Definition at line 705 of file CheckerManager.cpp.

Referenced by clang::ento::check::EndFunction::_register().

◆ _registerForEndOfTranslationUnit()

void CheckerManager::_registerForEndOfTranslationUnit ( CheckEndOfTranslationUnit  checkfn)

◆ _registerForEvalAssume()

void CheckerManager::_registerForEvalAssume ( EvalAssumeFunc  checkfn)

Definition at line 735 of file CheckerManager.cpp.

Referenced by clang::ento::eval::Assume::_register().

◆ _registerForEvalCall()

void CheckerManager::_registerForEvalCall ( EvalCallFunc  checkfn)

Definition at line 739 of file CheckerManager.cpp.

Referenced by clang::ento::eval::Call::_register().

◆ _registerForLiveSymbols()

void CheckerManager::_registerForLiveSymbols ( CheckLiveSymbolsFunc  checkfn)

Definition at line 714 of file CheckerManager.cpp.

Referenced by clang::ento::check::LiveSymbols::_register().

◆ _registerForLocation()

void CheckerManager::_registerForLocation ( CheckLocationFunc  checkfn)

Definition at line 689 of file CheckerManager.cpp.

Referenced by clang::ento::check::Location::_register().

◆ _registerForObjCMessageNil()

void CheckerManager::_registerForObjCMessageNil ( CheckObjCMessageFunc  checkfn)

Definition at line 674 of file CheckerManager.cpp.

Referenced by clang::ento::check::ObjCMessageNil::_register().

◆ _registerForPointerEscape()

void CheckerManager::_registerForPointerEscape ( CheckPointerEscapeFunc  checkfn)

◆ _registerForPostCall()

void CheckerManager::_registerForPostCall ( CheckCallFunc  checkfn)

Definition at line 685 of file CheckerManager.cpp.

Referenced by clang::ento::check::PostCall::_register().

◆ _registerForPostObjCMessage()

void CheckerManager::_registerForPostObjCMessage ( CheckObjCMessageFunc  checkfn)

Definition at line 678 of file CheckerManager.cpp.

Referenced by clang::ento::check::PostObjCMessage::_register().

◆ _registerForPostStmt()

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

Definition at line 664 of file CheckerManager.cpp.

Referenced by clang::ento::check::PostStmt< STMT >::_register().

◆ _registerForPreCall()

void CheckerManager::_registerForPreCall ( CheckCallFunc  checkfn)

Definition at line 682 of file CheckerManager.cpp.

Referenced by clang::ento::check::PreCall::_register().

◆ _registerForPreObjCMessage()

void CheckerManager::_registerForPreObjCMessage ( CheckObjCMessageFunc  checkfn)

Definition at line 670 of file CheckerManager.cpp.

Referenced by clang::ento::check::PreObjCMessage::_register().

◆ _registerForPreStmt()

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

◆ _registerForRegionChanges()

void CheckerManager::_registerForRegionChanges ( CheckRegionChangesFunc  checkfn)

Definition at line 722 of file CheckerManager.cpp.

Referenced by clang::ento::check::RegionChanges::_register().

◆ _registerListenerForEvent()

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

Definition at line 521 of file CheckerManager.h.

Referenced by clang::ento::check::Event< EVENT >::_register().

◆ finishedCheckerRegistration()

void CheckerManager::finishedCheckerRegistration ( )

Definition at line 42 of file CheckerManager.cpp.

◆ getAnalyzerOptions()

AnalyzerOptions& clang::ento::CheckerManager::getAnalyzerOptions ( )
inline

Definition at line 122 of file CheckerManager.h.

Referenced by isVirtualCall().

◆ getCurrentCheckName()

CheckName clang::ento::CheckerManager::getCurrentCheckName ( ) const
inline

Definition at line 115 of file CheckerManager.h.

◆ getLangOpts()

const LangOptions& clang::ento::CheckerManager::getLangOpts ( ) const
inline

Definition at line 121 of file CheckerManager.h.

◆ hasPathSensitiveCheckers()

bool CheckerManager::hasPathSensitiveCheckers ( ) const

Definition at line 24 of file CheckerManager.cpp.

◆ registerChecker() [1/2]

template<typename CHECKER >
CHECKER* clang::ento::CheckerManager::registerChecker ( )
inline

Used to register checkers.

Returns
a pointer to the checker object.

Definition at line 136 of file CheckerManager.h.

References CHECKER.

Referenced by addValue(), AttrFilter(), clang::ento::mpi::MPIChecker::checkMissingWaits(), emitBug(), hasDefinition(), IsCFError(), isIdenticalStmt(), isInitMessage(), and isVirtualCall().

◆ registerChecker() [2/2]

template<typename CHECKER >
CHECKER* clang::ento::CheckerManager::registerChecker ( AnalyzerOptions AOpts)
inline

Definition at line 151 of file CheckerManager.h.

References CHECKER.

◆ runCheckersForBeginFunction()

void CheckerManager::runCheckersForBeginFunction ( ExplodedNodeSet Dst,
const BlockEdge L,
ExplodedNode Pred,
ExprEngine Eng 
)

Run checkers on beginning of function.

Definition at line 404 of file CheckerManager.cpp.

References expandGraphWithCheckers(), and clang::ento::ExplodedNodeSet::insert().

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

◆ runCheckersForBind()

void CheckerManager::runCheckersForBind ( ExplodedNodeSet Dst,
const ExplodedNodeSet Src,
SVal  location,
SVal  val,
const Stmt S,
ExprEngine Eng,
const ProgramPoint PP 
)

Run checkers for binding of a value to a location.

Definition at line 364 of file CheckerManager.cpp.

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

◆ runCheckersForBranchCondition()

void CheckerManager::runCheckersForBranchCondition ( const Stmt condition,
ExplodedNodeSet Dst,
ExplodedNode Pred,
ExprEngine Eng 
)

Run checkers for branch condition.

Definition at line 462 of file CheckerManager.cpp.

References expandGraphWithCheckers(), and clang::ento::ExplodedNodeSet::insert().

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

◆ runCheckersForCallEvent()

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

Run checkers for visiting obj-c messages.

Run checkers for visiting an abstract call event.

Definition at line 275 of file CheckerManager.cpp.

References expandGraphWithCheckers(), clang::ento::ExplodedNode::getLocationContext(), clang::ProgramPoint::getProgramPoint(), clang::ProgramPoint::PreLoadKind, and clang::ProgramPoint::PreStoreKind.

◆ runCheckersForDeadSymbols()

void CheckerManager::runCheckersForDeadSymbols ( ExplodedNodeSet Dst,
const ExplodedNodeSet Src,
SymbolReaper SymReaper,
const Stmt S,
ExprEngine Eng,
ProgramPoint::Kind  K 
)

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.

Definition at line 511 of file CheckerManager.cpp.

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

◆ runCheckersForEndAnalysis()

void CheckerManager::runCheckersForEndAnalysis ( ExplodedGraph G,
BugReporter BR,
ExprEngine Eng 
)

Run checkers for end of analysis.

Definition at line 373 of file CheckerManager.cpp.

References clang::ProgramPoint::withTag().

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

◆ runCheckersForEndFunction()

void CheckerManager::runCheckersForEndFunction ( NodeBuilderContext BC,
ExplodedNodeSet Dst,
ExplodedNode Pred,
ExprEngine Eng 
)

Run checkers on end of function.

Run checkers for end of path.

Definition at line 417 of file CheckerManager.cpp.

References clang::ento::NodeBuilderContext::Block, and clang::ento::ExplodedNode::getLocationContext().

◆ runCheckersForEvalAssume()

ProgramStateRef CheckerManager::runCheckersForEvalAssume ( ProgramStateRef  state,
SVal  Cond,
bool  Assumption 
)

Run checkers for handling assumptions on symbolic values.

Definition at line 564 of file CheckerManager.cpp.

References clang::CodeGen::state.

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

◆ runCheckersForEvalCall()

void CheckerManager::runCheckersForEvalCall ( ExplodedNodeSet Dst,
const ExplodedNodeSet Src,
const CallEvent Call,
ExprEngine Eng 
)

◆ runCheckersForLiveSymbols()

void CheckerManager::runCheckersForLiveSymbols ( ProgramStateRef  state,
SymbolReaper SymReaper 
)

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.

Definition at line 473 of file CheckerManager.cpp.

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

◆ runCheckersForLocation()

void CheckerManager::runCheckersForLocation ( ExplodedNodeSet Dst,
const ExplodedNodeSet Src,
SVal  location,
bool  isLoad,
const Stmt NodeEx,
const Stmt BoundEx,
ExprEngine Eng 
)

Run checkers for load/store of a location.

Definition at line 324 of file CheckerManager.cpp.

References expandGraphWithCheckers().

◆ runCheckersForObjCMessage()

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

◆ runCheckersForObjCMessageNil()

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

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

Definition at line 233 of file CheckerManager.h.

References clang::ento::MessageNil.

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

◆ runCheckersForPointerEscape()

ProgramStateRef CheckerManager::runCheckersForPointerEscape ( ProgramStateRef  State,
const InvalidatedSymbols Escaped,
const CallEvent Call,
PointerEscapeKind  Kind,
RegionAndSymbolInvalidationTraits ITraits 
)

Run checkers when pointers escape.

Run checkers to process symbol escape event.

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.

Parameters
StateThe state at the point of escape.
EscapedThe list of escaped symbols.
CallThe corresponding CallEvent, if the symbols escape as parameters to the given call.
KindThe reason of pointer escape.
ITraitsInformation about invalidation for a particular region/symbol.
Returns
Checkers can modify the state by returning a new one.

Definition at line 543 of file CheckerManager.cpp.

References clang::ento::PSK_DirectEscapeOnCall, clang::ento::PSK_IndirectEscapeOnCall, and State.

Referenced by clang::ento::ExprEngine::notifyCheckersOfPointerEscape(), and clang::ento::ExprEngine::processPointerEscapedOnBind().

◆ runCheckersForPostCall()

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

Run checkers for post-visiting obj-c messages.

Definition at line 256 of file CheckerManager.h.

References clang::CodeGen::state, and State.

Referenced by clang::ento::ExprEngine::evalCall(), and clang::ento::ExprEngine::VisitObjCMessage().

◆ runCheckersForPostObjCMessage()

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

Run checkers for post-visiting obj-c messages.

Definition at line 223 of file CheckerManager.h.

References clang::ento::Post.

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

◆ runCheckersForPostStmt()

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

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.

See also
runCheckersForBranchCondition, runCheckersForPreStmt

Definition at line 200 of file CheckerManager.h.

Referenced by clang::ento::ExprEngine::VisitArraySubscriptExpr(), clang::ento::ExprEngine::VisitLambdaExpr(), and clang::ento::ExprEngine::VisitLvalObjCIvarRefExpr().

◆ runCheckersForPreCall()

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

Run checkers for pre-visiting obj-c messages.

Definition at line 250 of file CheckerManager.h.

Referenced by clang::ento::ExprEngine::evalCall(), clang::ento::ExprEngine::VisitCXXNewAllocatorCall(), and clang::ento::ExprEngine::VisitObjCMessage().

◆ runCheckersForPreObjCMessage()

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

Run checkers for pre-visiting obj-c messages.

Definition at line 215 of file CheckerManager.h.

References clang::ento::Pre.

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

◆ runCheckersForPreStmt()

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

◆ runCheckersForPrintState()

void CheckerManager::runCheckersForPrintState ( raw_ostream &  Out,
ProgramStateRef  State,
const char *  NL,
const char *  Sep 
)

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.

Parameters
OutThe output stream
StateThe state being printed
NLThe preferred representation of a newline.
SepThe preferred separator between different kinds of data.

Definition at line 633 of file CheckerManager.cpp.

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

◆ runCheckersForRegionChanges()

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

Run checkers for region changes.

This corresponds to the check::RegionChanges callback.

Parameters
stateThe current program state.
invalidatedA set of all symbols potentially touched by the change.
ExplicitRegionsThe regions explicitly requested for invalidation. For example, in the case of a function call, these would be arguments.
RegionsThe transitive closure of accessible regions, i.e. all regions that may have been touched by this change.
CallThe call expression wrapper if the regions are invalidated by a call.

Definition at line 523 of file CheckerManager.cpp.

References clang::CodeGen::state.

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

◆ runCheckersForStmt()

void CheckerManager::runCheckersForStmt ( bool  isPreVisit,
ExplodedNodeSet Dst,
const ExplodedNodeSet Src,
const Stmt S,
ExprEngine Eng,
bool  wasInlined = false 
)

Run checkers for visiting Stmts.

Definition at line 166 of file CheckerManager.cpp.

◆ runCheckersOnASTBody()

void CheckerManager::runCheckersOnASTBody ( const Decl D,
AnalysisManager mgr,
BugReporter BR 
)

Run checkers handling Decls containing a Stmt body.

Definition at line 81 of file CheckerManager.cpp.

References clang::Decl::hasBody().

◆ runCheckersOnASTDecl()

void CheckerManager::runCheckersOnASTDecl ( const Decl D,
AnalysisManager mgr,
BugReporter BR 
)

Run checkers handling Decls.

Definition at line 56 of file CheckerManager.cpp.

References clang::Decl::getKind().

◆ runCheckersOnEndOfTranslationUnit()

void CheckerManager::runCheckersOnEndOfTranslationUnit ( const TranslationUnitDecl TU,
AnalysisManager mgr,
BugReporter BR 
)

Run checkers for the entire Translation Unit.

Definition at line 625 of file CheckerManager.cpp.

◆ setCurrentCheckName()

void clang::ento::CheckerManager::setCurrentCheckName ( CheckName  name)
inline

Definition at line 114 of file CheckerManager.h.

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


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