class CallDescriptionMap
Declaration
template <typename T>
class CallDescriptionMap { /* full declaration omitted */ };
Description
An immutable map from CallDescriptions to arbitrary data. Provides a unified way for checkers to react on function calls.
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h:165
Templates
- T
Member Variables
- private std::vector<std::pair<CallDescription, T>> LinearMap
Method Overview
- public CallDescriptionMap<T>(std::initializer_list<std::pair<CallDescription, T>> && List)
- public CallDescriptionMap<T>(const CallDescriptionMap<T> &)
- public CallDescriptionMap<T>(CallDescriptionMap<T> &&)
- public template <typename InputIt> CallDescriptionMap<T>(InputIt First, InputIt Last)
- public const T * lookup(const clang::ento::CallEvent & Call) const
- public const T * lookupAsWritten(const clang::CallExpr & Call) const
- public ~CallDescriptionMap<T>()
Methods
¶CallDescriptionMap<T>(
std::initializer_list<
std::pair<CallDescription, T>>&& List)
CallDescriptionMap<T>(
std::initializer_list<
std::pair<CallDescription, T>>&& List)
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h:176
Parameters
- std::initializer_list< std::pair<CallDescription, T>>&& List
¶CallDescriptionMap<T>(
const CallDescriptionMap<T>&)
CallDescriptionMap<T>(
const CallDescriptionMap<T>&)
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h:187
Parameters
- const CallDescriptionMap<T>&
¶CallDescriptionMap<T>(CallDescriptionMap<T>&&)
CallDescriptionMap<T>(CallDescriptionMap<T>&&)
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h:190
Parameters
- CallDescriptionMap<T>&&
¶template <typename InputIt>
CallDescriptionMap<T>(InputIt First, InputIt Last)
template <typename InputIt>
CallDescriptionMap<T>(InputIt First, InputIt Last)
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h:181
Templates
- InputIt
Parameters
- InputIt First
- InputIt Last
¶const T* lookup(
const clang::ento::CallEvent& Call) const
const T* lookup(
const clang::ento::CallEvent& Call) const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h:193
Parameters
- const clang::ento::CallEvent& Call
¶const T* lookupAsWritten(
const clang::CallExpr& Call) const
const T* lookupAsWritten(
const clang::CallExpr& Call) const
Description
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.
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h:215
Parameters
- const clang::CallExpr& Call
¶~CallDescriptionMap<T>()
~CallDescriptionMap<T>()
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h:183