clang API Documentation

Public Member Functions | Static Public Member Functions | Friends
clang::CXXDeleteExpr Class Reference

Represents a delete expression for memory deallocation and destructor calls, e.g. "delete[] pArray". More...

#include <ExprCXX.h>

Inheritance diagram for clang::CXXDeleteExpr:
Inheritance graph
[legend]
Collaboration diagram for clang::CXXDeleteExpr:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CXXDeleteExpr (QualType ty, bool globalDelete, bool arrayForm, bool arrayFormAsWritten, bool usualArrayDeleteWantsSize, FunctionDecl *operatorDelete, Expr *arg, SourceLocation loc)
 CXXDeleteExpr (EmptyShell Shell)
bool isGlobalDelete () const
bool isArrayForm () const
bool isArrayFormAsWritten () const
bool doesUsualArrayDeleteWantSize () const
FunctionDecl * getOperatorDelete () const
Expr * getArgument ()
const Expr * getArgument () const
QualType getDestroyedType () const
 Retrieve the type being destroyed.
SourceLocation getLocStart () const LLVM_READONLY
SourceLocation getLocEnd () const LLVM_READONLY
child_range children ()

Static Public Member Functions

static bool classof (const Stmt *T)

Friends

class ASTStmtReader

Detailed Description

Represents a delete expression for memory deallocation and destructor calls, e.g. "delete[] pArray".

Definition at line 1806 of file ExprCXX.h.


Constructor & Destructor Documentation

clang::CXXDeleteExpr::CXXDeleteExpr ( QualType  ty,
bool  globalDelete,
bool  arrayForm,
bool  arrayFormAsWritten,
bool  usualArrayDeleteWantsSize,
FunctionDecl *  operatorDelete,
Expr *  arg,
SourceLocation  loc 
) [inline]

Definition at line 1825 of file ExprCXX.h.

clang::CXXDeleteExpr::CXXDeleteExpr ( EmptyShell  Shell) [inline, explicit]

Definition at line 1835 of file ExprCXX.h.


Member Function Documentation

Reimplemented from clang::Stmt.

Definition at line 1870 of file ExprCXX.h.

static bool clang::CXXDeleteExpr::classof ( const Stmt *  T) [inline, static]

Reimplemented from clang::Expr.

Definition at line 1865 of file ExprCXX.h.

References clang::Stmt::getStmtClass().

Answers whether the usual array deallocation function for the allocated type expects the size of the allocation as a parameter. This can be true even if the actual deallocation function that we're using doesn't want a size.

Definition at line 1847 of file ExprCXX.h.

Referenced by clang::CodeGen::CGCXXABI::requiresArrayCookie().

const Expr* clang::CXXDeleteExpr::getArgument ( ) const [inline]

Definition at line 1854 of file ExprCXX.h.

Retrieve the type being destroyed.

If the type being destroyed is a dependent type which may or may not be a pointer, return an invalid type.

Definition at line 216 of file ExprCXX.cpp.

References getArgument(), clang::Type::getAs(), clang::Expr::getType(), clang::Type::isDependentType(), and clang::Type::isPointerType().

Referenced by clang::CFGImplicitDtor::getDestructorDecl(), and clang::ento::ExprEngine::ProcessDeleteDtor().

Reimplemented from clang::Stmt.

Definition at line 1863 of file ExprCXX.h.

References clang::Stmt::getLocEnd().

Reimplemented from clang::Stmt.

Definition at line 1862 of file ExprCXX.h.

Referenced by clang::ento::ExprEngine::ProcessDeleteDtor().

Definition at line 1851 of file ExprCXX.h.

Referenced by EmitObjectDelete().

Definition at line 1840 of file ExprCXX.h.

Referenced by clang::CodeGen::CodeGenFunction::EmitCXXDeleteExpr().

Definition at line 1841 of file ExprCXX.h.

Definition at line 1839 of file ExprCXX.h.


Friends And Related Function Documentation

friend class ASTStmtReader [friend]

Reimplemented from clang::Stmt.

Definition at line 1872 of file ExprCXX.h.


The documentation for this class was generated from the following files: