class CXXAllocatorCall
Declaration
class CXXAllocatorCall : public AnyFunctionCall { /* full declaration omitted */ };
Description
Represents the memory allocation call in a C++ new-expression. This is a call to "operator new".
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:999
Inherits from: AnyFunctionCall
Member Variables
Inherited from CallEvent:
Method Overview
- protected CXXAllocatorCall(const clang::CXXNewExpr * E, clang::ento::ProgramStateRef St, const clang::LocationContext * LCtx)
- protected CXXAllocatorCall(const clang::ento::CXXAllocatorCall & Other)
- public static bool classof(const clang::ento::CallEvent * CE)
- protected void cloneTo(void * Dest) const
- public const clang::Expr * getArgExpr(unsigned int Index) const
- public const clang::FunctionDecl * getDecl() const
- public clang::ento::CallEvent::Kind getKind() const
- public llvm::StringRef getKindAsString() const
- public unsigned int getNumArgs() const
- public unsigned int getNumImplicitArgs() const
- public clang::ento::SVal getObjectUnderConstruction() const
- public const clang::CXXNewExpr * getOriginExpr() const
- public const clang::Expr * getPlacementArgExpr(unsigned int Index) const
Inherited from AnyFunctionCall:
- public argumentsMayEscape
- public classof
- public getDecl
- public getInitialStackFrameContents
- public getRuntimeDefinition
- public parameters
Inherited from CallEvent:
- public argumentsMayEscape
- protected cloneTo
- public cloneWithState
- public cloneWithState
- public dump
- public dump
- public getASTArgumentIndex
- public getAdjustedParameterIndex
- public getArgExpr
- public getArgSVal
- public getArgSourceRange
- public getCalleeAnalysisDeclContext
- public getCalleeIdentifier
- public getCalleeStackFrame
- public getConstructionContext
- public getDecl
- public getDeclaredResultType
- protected getExtraInvalidatedValues
- public getInitialStackFrameContents
- public getKind
- public getKindAsString
- public getLocationContext
- public getNumArgs
- public getOriginExpr
- public getParameterLocation
- public getProgramPoint
- public getResultType
- public getReturnValue
- public getReturnValueUnderConstruction
- public getRuntimeDefinition
- protected getSVal
- public getSourceRange
- public getState
- public hasNonNullArgumentsWithType
- public hasNonZeroCallbackArg
- public hasVoidPointerToNonConstArg
- public invalidateRegions
- public isArgumentConstructedDirectly
- public isCallStmt
- public isForeign
- public isGlobalCFunction
- public isInSystemHeader
- public isVariadic
- public param_type_begin
- public param_type_end
- public parameters
- public setForeign
Methods
¶CXXAllocatorCall(
const clang::CXXNewExpr* E,
clang::ento::ProgramStateRef St,
const clang::LocationContext* LCtx)
CXXAllocatorCall(
const clang::CXXNewExpr* E,
clang::ento::ProgramStateRef St,
const clang::LocationContext* LCtx)
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1003
Parameters
- const clang::CXXNewExpr* E
- clang::ento::ProgramStateRef St
- const clang::LocationContext* LCtx
¶CXXAllocatorCall(
const clang::ento::CXXAllocatorCall& Other)
CXXAllocatorCall(
const clang::ento::CXXAllocatorCall& Other)
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1006
Parameters
- const clang::ento::CXXAllocatorCall& Other
¶static bool classof(
const clang::ento::CallEvent* CE)
static bool classof(
const clang::ento::CallEvent* CE)
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1054
Parameters
- const clang::ento::CallEvent* CE
¶void cloneTo(void* Dest) const
void cloneTo(void* Dest) const
Description
Copies this CallEvent, with vtable intact, into a new block of memory.
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1008
Parameters
- void* Dest
¶const clang::Expr* getArgExpr(
unsigned int Index) const
const clang::Expr* getArgExpr(
unsigned int Index) const
Description
Returns the expression associated with a given argument. May be null if this expression does not appear in the source.
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1036
Parameters
- unsigned int Index
¶const clang::FunctionDecl* getDecl() const
const clang::FunctionDecl* getDecl() const
Description
Returns the declaration of the function or method that will be called. May be null.
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1015
¶clang::ento::CallEvent::Kind getKind() const
clang::ento::CallEvent::Kind getKind() const
Description
Returns the kind of call this is.
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1051
¶llvm::StringRef getKindAsString() const
llvm::StringRef getKindAsString() const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1052
¶unsigned int getNumArgs() const
unsigned int getNumArgs() const
Description
Returns the number of arguments (explicit and implicit). Note that this may be greater than the number of parameters in the callee's declaration, and that it may include arguments not written in the source.
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1032
¶unsigned int getNumImplicitArgs() const
unsigned int getNumImplicitArgs() const
Description
Number of non-placement arguments to the call. It is equal to 2 for C++17 aligned operator new() calls that have alignment implicitly passed as the second argument, and to 1 for other operator new() calls.
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1028
¶clang::ento::SVal getObjectUnderConstruction()
const
clang::ento::SVal getObjectUnderConstruction()
const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1019
¶const clang::CXXNewExpr* getOriginExpr() const
const clang::CXXNewExpr* getOriginExpr() const
Description
Returns the expression whose value will be the result of this call. May be null.
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1011
¶const clang::Expr* getPlacementArgExpr(
unsigned int Index) const
const clang::Expr* getPlacementArgExpr(
unsigned int Index) const
Description
Number of placement arguments to the operator new() call. For example, standard std::nothrow operator new and standard placement new both have 1 implicit argument (size) and 1 placement argument, while regular operator new() has 1 implicit argument and 0 placement arguments.
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1047
Parameters
- unsigned int Index