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 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)

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 2660 of file Expr.h.


Member Typedef Documentation

Definition at line 2725 of file Expr.h.

Definition at line 2724 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 2678 of file Expr.h.

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

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

Construct an empty cast.

Definition at line 2702 of file Expr.h.


Member Function Documentation

Reimplemented from clang::Stmt.

Definition at line 2741 of file Expr.h.

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

Definition at line 1560 of file Expr.cpp.

References clang::CK_AddressSpaceConversion, 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_BuiltinFnToFnPtr, clang::CK_ConstructorConversion, clang::CK_CopyAndAutoreleaseBlockObject, 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_ReinterpretMemberPointer, clang::CK_ToUnion, clang::CK_ToVoid, clang::CK_UncheckedDerivedToBase, clang::CK_UserDefinedConversion, clang::CK_VectorSplat, and clang::CK_ZeroToOCLEvent.

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

Definition at line 2713 of file Expr.h.

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 1677 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 2720 of file Expr.h.

References getSubExprAsWritten().

Definition at line 2730 of file Expr.h.

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

Definition at line 2726 of file Expr.h.

References clang::Stmt::CastExprBits.

Referenced by dumpBasePath(), and ImportCastPath().

Definition at line 2731 of file Expr.h.

References path_size().

Definition at line 2727 of file Expr.h.

References clang::Stmt::CastExprBits.

Referenced by HandleBaseToDerivedCast(), and path_end().

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

Definition at line 2709 of file Expr.h.

References clang::Stmt::CastExprBits.

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

Definition at line 2714 of file Expr.h.


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