clang: clang::ento::CallDescriptionSet Class Reference (original) (raw)
An immutable set of CallDescriptions. More...
#include "[clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h](CallDescription%5F8h%5Fsource.html)"
Public Member Functions | |
---|---|
CallDescriptionSet (std::initializer_list< CallDescription > &&List) | |
CallDescriptionSet (const CallDescriptionSet &)=delete | |
CallDescriptionSet & | operator= (const CallDescription &)=delete |
bool | contains (const CallEvent &Call) const |
bool | containsAsWritten (const CallExpr &CE) const |
When available, always prefer lookup with a CallEvent! This function exists only when that is not available, for example, when only syntactic check is done on a piece of code. | |
An immutable set of CallDescriptions.
Checkers can efficiently decide if a given CallEvent matches any CallDescription in the set.
Definition at line 262 of file CallDescription.h.
ento::CallDescriptionSet::CallDescriptionSet | ( | std::initializer_list< CallDescription > && | List | ) |
---|
◆ CallDescriptionSet() [2/2]
◆ contains()
bool ento::CallDescriptionSet::contains | ( | const CallEvent & | Call | ) | const |
---|
◆ containsAsWritten()
bool ento::CallDescriptionSet::containsAsWritten | ( | const CallExpr & | CE | ) | const |
---|
When available, always prefer lookup with a CallEvent! This function exists only when that is not available, for example, when only syntactic check is done on a piece of code.
Also, StdLibraryFunctionsChecker::Signature is likely a better candicade for syntactic only matching if you are writing a new checker. This is handy if a CallDescriptionMap is already there.
The function is imprecise because CallEvent may know path sensitive information, such as the precise argument count (see comments for CallEvent::getNumArgs), the called function if it was called through a function pointer, and other information not available syntactically.
Definition at line 167 of file CallDescription.cpp.
◆ operator=()
The documentation for this class was generated from the following files:
- include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h
- lib/StaticAnalyzer/Core/CallDescription.cpp