#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
E
is greater than or equal to Val
under unsigned comparison.
E
is negative.
malloc
.
Definition at line 24 of file CheckerContext.h.
◆ CheckerContext() ◆ addSink() ◆ addTransition() [1/2]Generates a new transition with the given predecessor.
Allows checkers to generate a chain of nodes.
Definition at line 182 of file CheckerContext.h.
◆ addTransition() [2/2]Generates a new transition in the program state graph (ExplodedGraph).
Uses the default CheckerContext predecessor node.
Definition at line 170 of file CheckerContext.h.
References getState().
Referenced by addSink(), and generateNonFatalErrorNode().
◆ blockCount() unsigned clang::ento::CheckerContext::blockCount ( ) const inline ◆ emitReport() void clang::ento::CheckerContext::emitReport ( std::unique_ptr< BugReport > R ) inline ◆ generateErrorNode() [1/2]Generate a transition to a node that will be used to report an error.
This node will be a sink. That is, it will stop exploration of the given path.
Definition at line 225 of file CheckerContext.h.
References generateSink(), and clang::ProgramPoint::getTag().
◆ generateErrorNode() [2/2]Generate a transition to a node that will be used to report an error.
This node will be a sink. That is, it will stop exploration of the given path.
Definition at line 210 of file CheckerContext.h.
References generateSink(), and clang::ProgramPoint::getTag().
◆ generateNonFatalErrorNode() [1/2]Generate a transition to a node that will be used to report an error.
This node will not be a sink. That is, exploration will continue along this path.
Definition at line 255 of file CheckerContext.h.
References addTransition(), and clang::ProgramPoint::getTag().
◆ generateNonFatalErrorNode() [2/2]Generate a transition to a node that will be used to report an error.
This node will not be a sink. That is, exploration will continue along this path.
Definition at line 240 of file CheckerContext.h.
References addTransition(), and clang::ProgramPoint::getTag().
◆ generateSink() ◆ getAnalysisManager() ◆ getASTContext() [1/2] ASTContext & clang::ento::CheckerContext::getASTContext ( ) inline ◆ getASTContext() [2/2] const ASTContext & clang::ento::CheckerContext::getASTContext ( ) const inline ◆ getBlockID() unsigned clang::ento::CheckerContext::getBlockID ( ) const inline ◆ getBugReporter() BugReporter & clang::ento::CheckerContext::getBugReporter ( ) inline ◆ getCalleeDecl() ◆ getCalleeIdentifier() ◆ getCalleeName() [1/2] StringRef clang::ento::CheckerContext::getCalleeName ( const CallExpr * CE ) const inline ◆ getCalleeName() [2/2] StringRef CheckerContext::getCalleeName ( const FunctionDecl * FunDecl ) const ◆ getConstraintManager() ◆ getCurrentAnalysisDeclContext() ◆ getDeclDescription() StringRef CheckerContext::getDeclDescription ( const Decl * D )Returns the word that should be used to refer to the declaration in the report.
Definition at line 41 of file CheckerContext.cpp.
References D.
◆ getLangOpts() const LangOptions & clang::ento::CheckerContext::getLangOpts ( ) const inline ◆ getLocation() ◆ getLocationContext() const LocationContext * clang::ento::CheckerContext::getLocationContext ( ) const inline ◆ getLocationRegionIfPostStore() static const MemRegion * clang::ento::CheckerContext::getLocationRegionIfPostStore ( const ExplodedNode * N ) inlinestatic ◆ getMacroNameOrSpelling() StringRef CheckerContext::getMacroNameOrSpelling ( SourceLocation & Loc ) ◆ getNoteTag() [1/5] ◆ getNoteTag() [2/5] const NoteTag * clang::ento::CheckerContext::getNoteTag ( std::function< std::string()> && Cb, bool IsPrunable =false
) inline
A shorthand version of getNoteTag that doesn't require you to accept the arguments when you don't need it.
Definition at line 305 of file CheckerContext.h.
References getNoteTag().
◆ getNoteTag() [3/5]A shorthand version of getNoteTag that doesn't require you to accept the 'BugReporterContext' argument when you don't need it.
Definition at line 290 of file CheckerContext.h.
References getNoteTag().
◆ getNoteTag() [4/5]A shorthand version of getNoteTag that accepts a lambda with stream for note.
Definition at line 332 of file CheckerContext.h.
References getNoteTag(), and clang::ento::OS.
◆ getNoteTag() [5/5] const NoteTag * clang::ento::CheckerContext::getNoteTag ( StringRef Note, bool IsPrunable =false
) inline
A shorthand version of getNoteTag that accepts a plain note.
Definition at line 318 of file CheckerContext.h.
References getNoteTag(), and clang::Note.
◆ getPredecessor() ExplodedNode * clang::ento::CheckerContext::getPredecessor ( ) inlineReturns the previous node in the exploded graph, which includes the state of the program before the checker ran.
Note, checkers should not retain the node in their state since the nodes might get invalidated.
Definition at line 71 of file CheckerContext.h.
Referenced by addSink().
◆ getPreprocessor() Preprocessor & clang::ento::CheckerContext::getPreprocessor ( ) inline ◆ getSourceManager() const SourceManager & clang::ento::CheckerContext::getSourceManager ( ) inline ◆ getStackFrame() ◆ getState() ◆ getStateManager() ◆ getStoreManager() StoreManager & clang::ento::CheckerContext::getStoreManager ( ) inline ◆ getSVal() SVal clang::ento::CheckerContext::getSVal ( const Stmt * S ) const inline ◆ getSValBuilder() SValBuilder & clang::ento::CheckerContext::getSValBuilder ( ) inline ◆ getSymbolManager() SymbolManager & clang::ento::CheckerContext::getSymbolManager ( ) inline ◆ inTopFrame() bool clang::ento::CheckerContext::inTopFrame ( ) const inline ◆ isCLibraryFunction() bool CheckerContext::isCLibraryFunction ( const FunctionDecl * FD, StringRef Name =StringRef()
) static
Returns true if the given function is an externally-visible function in the top-level namespace, such as malloc
.
If a name is provided, the function must additionally match the given name.
Note that this also accepts functions from the std
namespace (because headers like <cstdlib> declare them there) and does not check if the function is declared as 'extern "C"' or if it uses C++ name mangling.
Definition at line 49 of file CheckerContext.cpp.
References clang::ASTContext::BuiltinInfo, clang::Decl::getASTContext(), clang::FunctionDecl::getBuiltinID(), clang::Decl::getDeclContext(), clang::NamedDecl::getIdentifier(), clang::IdentifierInfo::getName(), clang::Builtin::Context::getName(), clang::DeclContext::getRedeclContext(), clang::NamedDecl::isExternallyVisible(), clang::FunctionDecl::isInlined(), clang::DeclContext::isStdNamespace(), and clang::DeclContext::isTranslationUnit().
Referenced by clang::ento::CallEvent::isGlobalCFunction().
◆ isDifferent() bool clang::ento::CheckerContext::isDifferent ( ) inlineCheck if the checker changed the state of the execution; ex: added a new transition or a bug report.
Definition at line 77 of file CheckerContext.h.
◆ isGreaterOrEqual() bool CheckerContext::isGreaterOrEqual ( const Expr * E, unsigned long long Val ) ◆ isHardenedVariantOf() bool CheckerContext::isHardenedVariantOf ( const FunctionDecl * FD, StringRef Name ) staticIn builds that use source hardening (-D_FORTIFY_SOURCE), many standard functions are implemented as macros that expand to calls of hardened functions that take additional arguments compared to the "usual" variant and perform additional input validation.
For example, a memcpy
call may expand to __memcpy_chk()
or __builtin___memcpy_chk()
.
This method returns true if FD
declares a fortified variant of the standard library function Name
.
NOTE: This method relies on heuristics; extend it if you need to handle a hardened variant that's not yet covered by it.
Definition at line 116 of file CheckerContext.cpp.
References clang::NamedDecl::getIdentifier(), and clang::IdentifierInfo::getName().
◆ isNegative() bool CheckerContext::isNegative ( const Expr * E ) ◆ wasInlined const bool clang::ento::CheckerContext::wasInlinedIf we are post visiting a call, this flag will be set if the call was inlined.
In all other cases it will be false.
Definition at line 39 of file CheckerContext.h.
The documentation for this class was generated from the following files:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4