clang API Documentation
#include <CheckerManager.h>
Classes | |
struct | DeclCheckerInfo |
struct | EventInfo |
struct | RegionChangesCheckerInfo |
struct | StmtCheckerInfo |
Public Types | |
typedef CheckerBase * | CheckerRef |
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 &)> | 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 CallEvent *Call) | CheckRegionChangesFunc ) |
typedef CheckerFn< bool(ProgramStateRef)> | WantsRegionChangeUpdateFunc |
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, AnalyzerOptionsRef AOptions) | |
~CheckerManager () | |
void | setCurrentCheckName (CheckName name) |
CheckName | getCurrentCheckName () const |
bool | hasPathSensitiveCheckers () const |
void | finishedCheckerRegistration () |
const LangOptions & | getLangOpts () const |
AnalyzerOptions & | getAnalyzerOptions () |
template<typename CHECKER > | |
CHECKER * | registerChecker () |
Used to register checkers. | |
template<typename CHECKER > | |
CHECKER * | registerChecker (AnalyzerOptions &AOpts) |
void | runCheckersOnASTDecl (const Decl *D, AnalysisManager &mgr, BugReporter &BR) |
Run checkers handling Decls. | |
void | runCheckersOnASTBody (const Decl *D, AnalysisManager &mgr, BugReporter &BR) |
Run checkers handling Decls containing a Stmt body. | |
void | runCheckersForPreStmt (ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const Stmt *S, ExprEngine &Eng) |
Run checkers for pre-visiting Stmts. | |
void | runCheckersForPostStmt (ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const Stmt *S, ExprEngine &Eng, bool wasInlined=false) |
Run checkers for post-visiting Stmts. | |
void | runCheckersForStmt (bool isPreVisit, ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const Stmt *S, ExprEngine &Eng, bool wasInlined=false) |
Run checkers for visiting Stmts. | |
void | runCheckersForPreObjCMessage (ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const ObjCMethodCall &msg, ExprEngine &Eng) |
Run checkers for pre-visiting obj-c messages. | |
void | runCheckersForPostObjCMessage (ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const ObjCMethodCall &msg, ExprEngine &Eng, bool wasInlined=false) |
Run checkers for post-visiting obj-c messages. | |
void | runCheckersForObjCMessage (bool isPreVisit, ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const ObjCMethodCall &msg, ExprEngine &Eng, bool wasInlined=false) |
Run checkers for visiting obj-c messages. | |
void | runCheckersForPreCall (ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const CallEvent &Call, ExprEngine &Eng) |
Run checkers for pre-visiting obj-c messages. | |
void | runCheckersForPostCall (ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const CallEvent &Call, ExprEngine &Eng, bool wasInlined=false) |
Run checkers for post-visiting obj-c messages. | |
void | runCheckersForCallEvent (bool isPreVisit, ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const CallEvent &Call, ExprEngine &Eng, bool wasInlined=false) |
Run checkers for visiting obj-c messages. | |
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. | |
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. | |
void | runCheckersForEndAnalysis (ExplodedGraph &G, BugReporter &BR, ExprEngine &Eng) |
Run checkers for end of analysis. | |
void | runCheckersForEndFunction (NodeBuilderContext &BC, ExplodedNodeSet &Dst, ExplodedNode *Pred, ExprEngine &Eng) |
Run checkers on end of function. | |
void | runCheckersForBranchCondition (const Stmt *condition, ExplodedNodeSet &Dst, ExplodedNode *Pred, ExprEngine &Eng) |
Run checkers for branch condition. | |
void | runCheckersForLiveSymbols (ProgramStateRef state, SymbolReaper &SymReaper) |
Run checkers for live symbols. | |
void | runCheckersForDeadSymbols (ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, SymbolReaper &SymReaper, const Stmt *S, ExprEngine &Eng, ProgramPoint::Kind K) |
Run checkers for dead symbols. | |
bool | wantsRegionChangeUpdate (ProgramStateRef state) |
True if at least one checker wants to check region changes. | |
ProgramStateRef | runCheckersForRegionChanges (ProgramStateRef state, const InvalidatedSymbols *invalidated, ArrayRef< const MemRegion * > ExplicitRegions, ArrayRef< const MemRegion * > Regions, const CallEvent *Call) |
Run checkers for region changes. | |
ProgramStateRef | runCheckersForPointerEscape (ProgramStateRef State, const InvalidatedSymbols &Escaped, const CallEvent *Call, PointerEscapeKind Kind, RegionAndSymbolInvalidationTraits *ITraits) |
Run checkers when pointers escape. | |
ProgramStateRef | runCheckersForEvalAssume (ProgramStateRef state, SVal Cond, bool Assumption) |
Run checkers for handling assumptions on symbolic values. | |
void | runCheckersForEvalCall (ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const CallEvent &CE, ExprEngine &Eng) |
Run checkers for evaluating a call. | |
void | runCheckersOnEndOfTranslationUnit (const TranslationUnitDecl *TU, AnalysisManager &mgr, BugReporter &BR) |
Run checkers for the entire Translation Unit. | |
void | runCheckersForPrintState (raw_ostream &Out, ProgramStateRef State, const char *NL, const char *Sep) |
Run checkers for debug-printing a ProgramState. | |
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 | _registerForPreCall (CheckCallFunc checkfn) |
void | _registerForPostCall (CheckCallFunc checkfn) |
void | _registerForLocation (CheckLocationFunc checkfn) |
void | _registerForBind (CheckBindFunc checkfn) |
void | _registerForEndAnalysis (CheckEndAnalysisFunc checkfn) |
void | _registerForEndFunction (CheckEndFunctionFunc checkfn) |
void | _registerForBranchCondition (CheckBranchConditionFunc checkfn) |
void | _registerForLiveSymbols (CheckLiveSymbolsFunc checkfn) |
void | _registerForDeadSymbols (CheckDeadSymbolsFunc checkfn) |
void | _registerForRegionChanges (CheckRegionChangesFunc checkfn, WantsRegionChangeUpdateFunc wantUpdateFn) |
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 |
Definition at line 150 of file CheckerManager.h.
typedef CheckerFn<void (const SVal &location, const SVal &val, const Stmt *S, CheckerContext &) clang::ento::CheckerManager::CheckBindFunc) |
Definition at line 462 of file CheckerManager.h.
typedef CheckerFn<void (const Stmt *, CheckerContext &) clang::ento::CheckerManager::CheckBranchConditionFunc) |
Definition at line 471 of file CheckerManager.h.
typedef CheckerFn<void (const CallEvent &, CheckerContext &)> clang::ento::CheckerManager::CheckCallFunc |
Definition at line 453 of file CheckerManager.h.
typedef CheckerFn<void (SymbolReaper &, CheckerContext &)> clang::ento::CheckerManager::CheckDeadSymbolsFunc |
Definition at line 474 of file CheckerManager.h.
typedef CheckerFn<void (const Decl *, AnalysisManager&, BugReporter &) clang::ento::CheckerManager::CheckDeclFunc) |
Definition at line 436 of file CheckerManager.h.
typedef CheckerFn<void (ExplodedGraph &, BugReporter &, ExprEngine &)> clang::ento::CheckerManager::CheckEndAnalysisFunc |
Definition at line 465 of file CheckerManager.h.
typedef CheckerFn<void (CheckerContext &)> clang::ento::CheckerManager::CheckEndFunctionFunc |
Definition at line 468 of file CheckerManager.h.
typedef CheckerFn<void (const TranslationUnitDecl *, AnalysisManager&, BugReporter &) clang::ento::CheckerManager::CheckEndOfTranslationUnit) |
Definition at line 503 of file CheckerManager.h.
typedef CheckerFn<void ()> clang::ento::CheckerManager::CheckerDtor |
Definition at line 175 of file CheckerManager.h.
Definition at line 173 of file CheckerManager.h.
typedef const void* clang::ento::CheckerManager::CheckerTag |
Definition at line 174 of file CheckerManager.h.
typedef CheckerFn<void (const void *event) clang::ento::CheckerManager::CheckEventFunc) |
Definition at line 549 of file CheckerManager.h.
typedef CheckerFn<void (ProgramStateRef,SymbolReaper &)> clang::ento::CheckerManager::CheckLiveSymbolsFunc |
Definition at line 476 of file CheckerManager.h.
typedef CheckerFn<void (const SVal &location, bool isLoad, const Stmt *S, CheckerContext &) clang::ento::CheckerManager::CheckLocationFunc) |
Definition at line 458 of file CheckerManager.h.
typedef CheckerFn<void (const ObjCMethodCall &, CheckerContext &)> clang::ento::CheckerManager::CheckObjCMessageFunc |
Definition at line 450 of file CheckerManager.h.
typedef CheckerFn<ProgramStateRef (ProgramStateRef, const InvalidatedSymbols &Escaped, const CallEvent *Call, PointerEscapeKind Kind, RegionAndSymbolInvalidationTraits *ITraits) clang::ento::CheckerManager::CheckPointerEscapeFunc) |
Definition at line 492 of file CheckerManager.h.
typedef CheckerFn<ProgramStateRef (ProgramStateRef, const InvalidatedSymbols *symbols, ArrayRef<const MemRegion *> ExplicitRegions, ArrayRef<const MemRegion *> Regions, const CallEvent *Call) clang::ento::CheckerManager::CheckRegionChangesFunc) |
Definition at line 483 of file CheckerManager.h.
typedef CheckerFn<void (const Stmt *, CheckerContext &) clang::ento::CheckerManager::CheckStmtFunc) |
Definition at line 447 of file CheckerManager.h.
typedef CheckerFn<ProgramStateRef (ProgramStateRef, const SVal &cond, bool assumption)> clang::ento::CheckerManager::EvalAssumeFunc |
Definition at line 496 of file CheckerManager.h.
typedef CheckerFn<bool (const CallExpr *, CheckerContext &) clang::ento::CheckerManager::EvalCallFunc) |
Definition at line 499 of file CheckerManager.h.
typedef void* clang::ento::CheckerManager::EventTag |
Definition at line 548 of file CheckerManager.h.
typedef bool(* clang::ento::CheckerManager::HandlesDeclFunc)(const Decl *D) |
Definition at line 438 of file CheckerManager.h.
typedef bool(* clang::ento::CheckerManager::HandlesStmtFunc)(const Stmt *D) |
Definition at line 505 of file CheckerManager.h.
typedef CheckerFn<bool (ProgramStateRef)> clang::ento::CheckerManager::WantsRegionChangeUpdateFunc |
Definition at line 485 of file CheckerManager.h.
clang::ento::CheckerManager::CheckerManager | ( | const LangOptions & | langOpts, |
AnalyzerOptionsRef | AOptions | ||
) | [inline] |
Definition at line 156 of file CheckerManager.h.
Definition at line 710 of file CheckerManager.cpp.
void clang::ento::CheckerManager::_dispatchEvent | ( | const EVENT & | event | ) | const [inline] |
Definition at line 564 of file CheckerManager.h.
Referenced by clang::ento::EventDispatcher< EVENT >::dispatchEvent().
void clang::ento::CheckerManager::_registerDispatcherForEvent | ( | ) | [inline] |
Definition at line 558 of file CheckerManager.h.
Referenced by clang::ento::EventDispatcher< EVENT >::_register().
void CheckerManager::_registerForBind | ( | CheckBindFunc | checkfn | ) |
Definition at line 634 of file CheckerManager.cpp.
Referenced by clang::ento::check::Bind::_register().
void CheckerManager::_registerForBody | ( | CheckDeclFunc | checkfn | ) |
Definition at line 597 of file CheckerManager.cpp.
Referenced by clang::ento::check::ASTCodeBody::_register().
void CheckerManager::_registerForBranchCondition | ( | CheckBranchConditionFunc | checkfn | ) |
Definition at line 646 of file CheckerManager.cpp.
Referenced by clang::ento::check::BranchCondition::_register().
void CheckerManager::_registerForConstPointerEscape | ( | CheckPointerEscapeFunc | checkfn | ) |
Definition at line 669 of file CheckerManager.cpp.
void CheckerManager::_registerForDeadSymbols | ( | CheckDeadSymbolsFunc | checkfn | ) |
Definition at line 655 of file CheckerManager.cpp.
Referenced by clang::ento::check::DeadSymbols::_register().
void CheckerManager::_registerForDecl | ( | CheckDeclFunc | checkfn, |
HandlesDeclFunc | isForDeclFn | ||
) |
Definition at line 591 of file CheckerManager.cpp.
Referenced by clang::ento::check::ASTDecl< DECL >::_register().
void CheckerManager::_registerForEndAnalysis | ( | CheckEndAnalysisFunc | checkfn | ) |
Definition at line 638 of file CheckerManager.cpp.
Referenced by clang::ento::check::EndAnalysis::_register().
void CheckerManager::_registerForEndFunction | ( | CheckEndFunctionFunc | checkfn | ) |
Definition at line 642 of file CheckerManager.cpp.
Referenced by clang::ento::check::EndFunction::_register().
Definition at line 682 of file CheckerManager.cpp.
Referenced by clang::ento::check::EndOfTranslationUnit::_register().
void CheckerManager::_registerForEvalAssume | ( | EvalAssumeFunc | checkfn | ) |
Definition at line 674 of file CheckerManager.cpp.
Referenced by clang::ento::eval::Assume::_register().
void CheckerManager::_registerForEvalCall | ( | EvalCallFunc | checkfn | ) |
Definition at line 678 of file CheckerManager.cpp.
Referenced by clang::ento::eval::Call::_register().
void CheckerManager::_registerForLiveSymbols | ( | CheckLiveSymbolsFunc | checkfn | ) |
Definition at line 651 of file CheckerManager.cpp.
Referenced by clang::ento::check::LiveSymbols::_register().
void CheckerManager::_registerForLocation | ( | CheckLocationFunc | checkfn | ) |
Definition at line 630 of file CheckerManager.cpp.
Referenced by clang::ento::check::Location::_register().
void CheckerManager::_registerForPointerEscape | ( | CheckPointerEscapeFunc | checkfn | ) |
Definition at line 665 of file CheckerManager.cpp.
Referenced by clang::ento::check::PointerEscape::_register(), and clang::ento::check::ConstPointerEscape::_register().
void CheckerManager::_registerForPostCall | ( | CheckCallFunc | checkfn | ) |
Definition at line 626 of file CheckerManager.cpp.
Referenced by clang::ento::check::PostCall::_register().
void CheckerManager::_registerForPostObjCMessage | ( | CheckObjCMessageFunc | checkfn | ) |
Definition at line 619 of file CheckerManager.cpp.
Referenced by clang::ento::check::PostObjCMessage::_register().
void CheckerManager::_registerForPostStmt | ( | CheckStmtFunc | checkfn, |
HandlesStmtFunc | isForStmtFn | ||
) |
Definition at line 610 of file CheckerManager.cpp.
Referenced by clang::ento::check::PostStmt< STMT >::_register().
void CheckerManager::_registerForPreCall | ( | CheckCallFunc | checkfn | ) |
Definition at line 623 of file CheckerManager.cpp.
Referenced by clang::ento::check::PreCall::_register().
void CheckerManager::_registerForPreObjCMessage | ( | CheckObjCMessageFunc | checkfn | ) |
Definition at line 616 of file CheckerManager.cpp.
Referenced by clang::ento::check::PreObjCMessage::_register().
void CheckerManager::_registerForPreStmt | ( | CheckStmtFunc | checkfn, |
HandlesStmtFunc | isForStmtFn | ||
) |
Definition at line 605 of file CheckerManager.cpp.
Referenced by clang::ento::check::PreStmt< ReturnStmt >::_register().
void CheckerManager::_registerForRegionChanges | ( | CheckRegionChangesFunc | checkfn, |
WantsRegionChangeUpdateFunc | wantUpdateFn | ||
) |
Definition at line 659 of file CheckerManager.cpp.
Referenced by clang::ento::check::RegionChanges::_register().
void clang::ento::CheckerManager::_registerListenerForEvent | ( | CheckEventFunc | checkfn | ) | [inline] |
Definition at line 552 of file CheckerManager.h.
Referenced by clang::ento::check::Event< EVENT >::_register().
Definition at line 42 of file CheckerManager.cpp.
Definition at line 171 of file CheckerManager.h.
CheckName clang::ento::CheckerManager::getCurrentCheckName | ( | ) | const [inline] |
Definition at line 164 of file CheckerManager.h.
const LangOptions& clang::ento::CheckerManager::getLangOpts | ( | ) | const [inline] |
Definition at line 170 of file CheckerManager.h.
bool CheckerManager::hasPathSensitiveCheckers | ( | ) | const |
Definition at line 24 of file CheckerManager.cpp.
CHECKER* clang::ento::CheckerManager::registerChecker | ( | ) | [inline] |
Used to register checkers.
Definition at line 185 of file CheckerManager.h.
References CHECKER.
CHECKER* clang::ento::CheckerManager::registerChecker | ( | AnalyzerOptions & | AOpts | ) | [inline] |
Definition at line 200 of file CheckerManager.h.
References CHECKER.
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 337 of file CheckerManager.cpp.
References AttributeLangSupport::C, and expandGraphWithCheckers().
Referenced by clang::ento::ExprEngine::evalBind().
void CheckerManager::runCheckersForBranchCondition | ( | const Stmt * | condition, |
ExplodedNodeSet & | Dst, | ||
ExplodedNode * | Pred, | ||
ExprEngine & | Eng | ||
) |
Run checkers for branch condition.
Definition at line 401 of file CheckerManager.cpp.
References AttributeLangSupport::C, expandGraphWithCheckers(), and clang::ento::ExplodedNodeSet::insert().
Referenced by clang::ento::ExprEngine::processBranch().
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 248 of file CheckerManager.cpp.
References AttributeLangSupport::C, and expandGraphWithCheckers().
Referenced by runCheckersForPostCall(), and runCheckersForPreCall().
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 450 of file CheckerManager.cpp.
References AttributeLangSupport::C, and expandGraphWithCheckers().
Referenced by clang::ento::ExprEngine::removeDead().
void CheckerManager::runCheckersForEndAnalysis | ( | ExplodedGraph & | G, |
BugReporter & | BR, | ||
ExprEngine & | Eng | ||
) |
Run checkers for end of analysis.
Definition at line 346 of file CheckerManager.cpp.
Referenced by clang::ento::ExprEngine::processEndWorklist().
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 356 of file CheckerManager.cpp.
References clang::ento::NodeBuilderContext::Block, AttributeLangSupport::C, and clang::ento::ExplodedNode::getLocationContext().
Referenced by clang::ento::ExprEngine::processEndOfFunction().
ProgramStateRef CheckerManager::runCheckersForEvalAssume | ( | ProgramStateRef | state, |
SVal | Cond, | ||
bool | Assumption | ||
) |
Run checkers for handling assumptions on symbolic values.
Definition at line 510 of file CheckerManager.cpp.
Referenced by clang::ento::ExprEngine::processAssume().
void CheckerManager::runCheckersForEvalCall | ( | ExplodedNodeSet & | Dst, |
const ExplodedNodeSet & | Src, | ||
const CallEvent & | CE, | ||
ExprEngine & | Eng | ||
) |
Run checkers for evaluating a call.
Run checkers for evaluating a call. Only one checker will evaluate the call.
Warning: Currently, the CallEvent MUST come from a CallExpr!
Definition at line 524 of file CheckerManager.cpp.
References clang::ento::ExplodedNodeSet::begin(), AttributeLangSupport::C, clang::ento::ExprEngine::defaultEvalCall(), clang::ento::ExplodedNodeSet::end(), clang::ento::ExprEngine::getBuilderContext(), clang::ento::ExplodedNode::getLocationContext(), clang::ento::CallEvent::getOriginExpr(), clang::ProgramPoint::getProgramPoint(), clang::ento::ExplodedNodeSet::insert(), and clang::ProgramPoint::PostStmtKind.
Referenced by clang::ento::ExprEngine::evalCall().
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 412 of file CheckerManager.cpp.
Referenced by clang::ento::ExprEngine::removeDead().
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 297 of file CheckerManager.cpp.
References AttributeLangSupport::C, and expandGraphWithCheckers().
void CheckerManager::runCheckersForObjCMessage | ( | bool | isPreVisit, |
ExplodedNodeSet & | Dst, | ||
const ExplodedNodeSet & | Src, | ||
const ObjCMethodCall & | msg, | ||
ExprEngine & | Eng, | ||
bool | wasInlined = false |
||
) |
Run checkers for visiting obj-c messages.
Definition at line 205 of file CheckerManager.cpp.
References AttributeLangSupport::C, and expandGraphWithCheckers().
Referenced by runCheckersForPostObjCMessage(), and runCheckersForPreObjCMessage().
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.
State | The state at the point of escape. |
Escaped | The list of escaped symbols. |
Call | The corresponding CallEvent, if the symbols escape as parameters to the given call. |
Kind | The reason of pointer escape. |
ITraits | Information about invalidation for a particular region/symbol. |
Definition at line 489 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().
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 295 of file CheckerManager.h.
References runCheckersForCallEvent().
Referenced by clang::ento::ExprEngine::evalCall(), clang::ento::ExprEngine::processCallExit(), clang::ento::ExprEngine::VisitCXXConstructExpr(), clang::ento::ExprEngine::VisitCXXDestructor(), clang::ento::ExprEngine::VisitCXXNewAllocatorCall(), and clang::ento::ExprEngine::VisitObjCMessage().
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 272 of file CheckerManager.h.
References runCheckersForObjCMessage().
Referenced by clang::ento::ExprEngine::processCallExit(), and clang::ento::ExprEngine::VisitObjCMessage().
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.
Definition at line 249 of file CheckerManager.h.
References runCheckersForStmt().
Referenced by clang::ento::ExprEngine::processCallExit(), clang::ento::ExprEngine::Visit(), clang::ento::ExprEngine::VisitBinaryOperator(), clang::ento::ExprEngine::VisitBlockExpr(), clang::ento::ExprEngine::VisitCallExpr(), clang::ento::ExprEngine::VisitCXXConstructExpr(), clang::ento::ExprEngine::VisitDeclStmt(), clang::ento::ExprEngine::VisitLvalObjCIvarRefExpr(), clang::ento::ExprEngine::VisitMemberExpr(), clang::ento::ExprEngine::VisitObjCForCollectionStmt(), clang::ento::ExprEngine::VisitUnaryExprOrTypeTraitExpr(), and clang::ento::ExprEngine::VisitUnaryOperator().
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 289 of file CheckerManager.h.
References runCheckersForCallEvent().
Referenced by clang::ento::ExprEngine::evalCall(), clang::ento::ExprEngine::VisitCXXConstructExpr(), clang::ento::ExprEngine::VisitCXXDestructor(), clang::ento::ExprEngine::VisitCXXNewAllocatorCall(), and clang::ento::ExprEngine::VisitObjCMessage().
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 264 of file CheckerManager.h.
References runCheckersForObjCMessage().
Referenced by clang::ento::ExprEngine::VisitObjCMessage().
void clang::ento::CheckerManager::runCheckersForPreStmt | ( | ExplodedNodeSet & | Dst, |
const ExplodedNodeSet & | Src, | ||
const Stmt * | S, | ||
ExprEngine & | Eng | ||
) | [inline] |
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.
Definition at line 236 of file CheckerManager.h.
References runCheckersForStmt().
Referenced by clang::ento::ExprEngine::Visit(), clang::ento::ExprEngine::VisitBinaryOperator(), clang::ento::ExprEngine::VisitCallExpr(), clang::ento::ExprEngine::VisitCast(), clang::ento::ExprEngine::VisitCXXConstructExpr(), clang::ento::ExprEngine::VisitDeclStmt(), clang::ento::ExprEngine::VisitLvalArraySubscriptExpr(), clang::ento::ExprEngine::VisitMemberExpr(), clang::ento::ExprEngine::VisitObjCAtSynchronizedStmt(), clang::ento::ExprEngine::VisitReturnStmt(), clang::ento::ExprEngine::VisitUnaryExprOrTypeTraitExpr(), and clang::ento::ExprEngine::VisitUnaryOperator().
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.
Out | The output stream |
State | The state being printed |
NL | The preferred representation of a newline. |
Sep | The preferred separator between different kinds of data. |
Definition at line 579 of file CheckerManager.cpp.
Referenced by clang::ento::ExprEngine::printState().
ProgramStateRef CheckerManager::runCheckersForRegionChanges | ( | ProgramStateRef | state, |
const InvalidatedSymbols * | invalidated, | ||
ArrayRef< const MemRegion * > | ExplicitRegions, | ||
ArrayRef< const MemRegion * > | Regions, | ||
const CallEvent * | Call | ||
) |
Run checkers for region changes.
This corresponds to the check::RegionChanges callback.
state | The current program state. |
invalidated | A set of all symbols potentially touched by the change. |
ExplicitRegions | The regions explicitly requested for invalidation. For example, in the case of a function call, these would be arguments. |
Regions | The transitive closure of accessible regions, i.e. all regions that may have been touched by this change. |
Call | The call expression wrapper if the regions are invalidated by a call. |
Definition at line 471 of file CheckerManager.cpp.
Referenced by clang::ento::ExprEngine::processRegionChanges().
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.
References AttributeLangSupport::C, and expandGraphWithCheckers().
Referenced by runCheckersForPostStmt(), and runCheckersForPreStmt().
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().
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().
void CheckerManager::runCheckersOnEndOfTranslationUnit | ( | const TranslationUnitDecl * | TU, |
AnalysisManager & | mgr, | ||
BugReporter & | BR | ||
) |
Run checkers for the entire Translation Unit.
Definition at line 571 of file CheckerManager.cpp.
void clang::ento::CheckerManager::setCurrentCheckName | ( | CheckName | name | ) | [inline] |
Definition at line 163 of file CheckerManager.h.
Referenced by clang::ento::CheckerRegistry::initializeManager().
True if at least one checker wants to check region changes.
Definition at line 461 of file CheckerManager.cpp.
Referenced by clang::ento::ExprEngine::wantsRegionChangeUpdate().