clang API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
clang::CastExpr Class Reference

#include <Expr.h>

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

List of all members.

Public Types

typedef clang::CastKind CastKind
typedef CXXBaseSpecifier ** path_iterator
typedef const CXXBaseSpecifier
*const * 
path_const_iterator

Public Member Functions

CastKind getCastKind () const
void setCastKind (CastKind K)
const char * getCastKindName () const
ExprgetSubExpr ()
const ExprgetSubExpr () const
void setSubExpr (Expr *E)
ExprgetSubExprAsWritten ()
 Retrieve the cast subexpression as it was written in the source code, looking through any implicit casts or other intermediate nodes introduced by semantic analysis.
const ExprgetSubExprAsWritten () const
bool path_empty () const
unsigned path_size () const
path_iterator path_begin ()
path_iterator path_end ()
path_const_iterator path_begin () const
path_const_iterator path_end () const
void setCastPath (const CXXCastPath &Path)
child_range children ()

Static Public Member Functions

static bool classof (const Stmt *T)
static bool classof (const CastExpr *)

Protected Member Functions

 CastExpr (StmtClass SC, QualType ty, ExprValueKind VK, const CastKind kind, Expr *op, unsigned BasePathSize)
 CastExpr (StmtClass SC, EmptyShell Empty, unsigned BasePathSize)
 Construct an empty cast.

Detailed Description

CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit casts that have some representation in the source code (ExplicitCastExpr's derived classes).

Definition at line 2477 of file Expr.h.


Member Typedef Documentation

Definition at line 2479 of file Expr.h.

Definition at line 2544 of file Expr.h.

Definition at line 2543 of file Expr.h.


Constructor & Destructor Documentation

clang::CastExpr::CastExpr ( StmtClass  SC,
QualType  ty,
ExprValueKind  VK,
const CastKind  kind,
Expr op,
unsigned  BasePathSize 
) [inline, protected]

Definition at line 2498 of file Expr.h.

References clang::Stmt::CastExprBits, and CK_Invalid.

clang::CastExpr::CastExpr ( StmtClass  SC,
EmptyShell  Empty,
unsigned  BasePathSize 
) [inline, protected]

Construct an empty cast.

Definition at line 2521 of file Expr.h.


Member Function Documentation

child_range clang::CastExpr::children ( ) [inline]

Reimplemented from clang::Stmt.

Definition at line 2561 of file Expr.h.

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

Definition at line 2558 of file Expr.h.

CastKind clang::CastExpr::getCastKind ( ) const [inline]
const char * CastExpr::getCastKindName ( ) const

Definition at line 1125 of file Expr.cpp.

References clang::CK_AnyPointerToBlockPointerCast, clang::CK_ARCConsumeObject, clang::CK_ARCExtendBlockObject, clang::CK_ARCProduceObject, clang::CK_ARCReclaimReturnedObject, clang::CK_ArrayToPointerDecay, clang::CK_AtomicToNonAtomic, clang::CK_BaseToDerived, clang::CK_BaseToDerivedMemberPointer, clang::CK_BitCast, clang::CK_BlockPointerToObjCPointerCast, clang::CK_ConstructorConversion, clang::CK_CPointerToObjCPointerCast, clang::CK_Dependent, clang::CK_DerivedToBase, clang::CK_DerivedToBaseMemberPointer, clang::CK_Dynamic, clang::CK_FloatingCast, clang::CK_FloatingComplexCast, clang::CK_FloatingComplexToBoolean, clang::CK_FloatingComplexToIntegralComplex, clang::CK_FloatingComplexToReal, clang::CK_FloatingRealToComplex, clang::CK_FloatingToBoolean, clang::CK_FloatingToIntegral, clang::CK_FunctionToPointerDecay, clang::CK_IntegralCast, clang::CK_IntegralComplexCast, clang::CK_IntegralComplexToBoolean, clang::CK_IntegralComplexToFloatingComplex, clang::CK_IntegralComplexToReal, clang::CK_IntegralRealToComplex, clang::CK_IntegralToBoolean, clang::CK_IntegralToFloating, clang::CK_IntegralToPointer, clang::CK_LValueBitCast, clang::CK_LValueToRValue, clang::CK_MemberPointerToBoolean, clang::CK_NonAtomicToAtomic, clang::CK_NoOp, clang::CK_NullToMemberPointer, clang::CK_NullToPointer, clang::CK_ObjCObjectLValueCast, clang::CK_PointerToBoolean, clang::CK_PointerToIntegral, clang::CK_ToUnion, clang::CK_ToVoid, clang::CK_UncheckedDerivedToBase, clang::CK_UserDefinedConversion, and clang::CK_VectorSplat.

Expr* clang::CastExpr::getSubExpr ( ) [inline]
const Expr* clang::CastExpr::getSubExpr ( ) const [inline]

Definition at line 2532 of file Expr.h.

Expr * CastExpr::getSubExprAsWritten ( )

Retrieve the cast subexpression as it was written in the source code, looking through any implicit casts or other intermediate nodes introduced by semantic analysis.

Definition at line 1232 of file Expr.cpp.

References clang::CK_ConstructorConversion, clang::CK_UserDefinedConversion, getCastKind(), and getSubExpr().

Referenced by getSubExprAsWritten(), and clang::TreeTransform< Derived >::TransformCXXNamedCastExpr().

const Expr* clang::CastExpr::getSubExprAsWritten ( ) const [inline]

Definition at line 2539 of file Expr.h.

References getSubExprAsWritten().

path_iterator clang::CastExpr::path_begin ( ) [inline]

Definition at line 2547 of file Expr.h.

Referenced by DumpBasePath(), and clang::CodeGen::CodeGenFunction::EmitCastLValue().

path_const_iterator clang::CastExpr::path_begin ( ) const [inline]

Definition at line 2549 of file Expr.h.

bool clang::CastExpr::path_empty ( ) const [inline]

Definition at line 2545 of file Expr.h.

References clang::Stmt::CastExprBits.

Referenced by DumpBasePath(), and ImportCastPath().

path_iterator clang::CastExpr::path_end ( ) [inline]

Definition at line 2548 of file Expr.h.

References path_size().

Referenced by DumpBasePath(), and clang::CodeGen::CodeGenFunction::EmitCastLValue().

path_const_iterator clang::CastExpr::path_end ( ) const [inline]

Definition at line 2550 of file Expr.h.

References path_size().

unsigned clang::CastExpr::path_size ( ) const [inline]

Definition at line 2546 of file Expr.h.

References clang::Stmt::CastExprBits.

Referenced by HandleBaseToDerivedCast(), and path_end().

void clang::CastExpr::setCastKind ( CastKind  K) [inline]

Definition at line 2528 of file Expr.h.

References clang::Stmt::CastExprBits.

void CastExpr::setCastPath ( const CXXCastPath Path)
void clang::CastExpr::setSubExpr ( Expr E) [inline]

Definition at line 2533 of file Expr.h.


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