clang API Documentation
#include <Expr.h>
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 |
Expr * | getSubExpr () |
const Expr * | getSubExpr () const |
void | setSubExpr (Expr *E) |
Expr * | 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. | |
const Expr * | getSubExprAsWritten () 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. |
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).
typedef const CXXBaseSpecifier* const* clang::CastExpr::path_const_iterator |
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] |
child_range clang::CastExpr::children | ( | ) | [inline] |
Reimplemented from clang::Stmt.
static bool clang::CastExpr::classof | ( | const Stmt * | T | ) | [inline, static] |
Reimplemented from clang::Expr.
Reimplemented in clang::CStyleCastExpr, clang::ExplicitCastExpr, clang::ImplicitCastExpr, clang::ObjCBridgedCastExpr, clang::CXXFunctionalCastExpr, clang::CXXConstCastExpr, clang::CXXReinterpretCastExpr, clang::CXXDynamicCastExpr, clang::CXXStaticCastExpr, and clang::CXXNamedCastExpr.
Definition at line 2735 of file Expr.h.
References clang::Stmt::getStmtClass().
CastKind clang::CastExpr::getCastKind | ( | ) | const [inline] |
Definition at line 2708 of file Expr.h.
References clang::Stmt::CastExprBits.
Referenced by clang::Sema::BuildCXXMemberCallExpr(), clang::canDynamicCastThrow(), clang::CodeGen::CodeGenFunction::EmitCastLValue(), clang::ento::SValBuilder::getConstantVal(), clang::CodeGen::CGCXXABI::getMemberPointerAdjustment(), getSubExprAsWritten(), clang::Expr::HasSideEffects(), clang::Expr::isConstantInitializer(), clang::arcmt::trans::isPlusOne(), clang::Expr::isUnusedResultAWarning(), maybeRebuildARCConsumingStmt(), shouldExtendReceiverForInnerPointerMessage(), ShouldNullCheckClassCastValue(), clang::ento::ExprEngine::VisitCast(), clang::threadSafety::BuildLockset::VisitCastExpr(), clang::ASTNodeImporter::VisitCStyleCastExpr(), clang::ASTNodeImporter::VisitImplicitCastExpr(), and warnOnSizeofOnArrayDecay().
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.
Expr* clang::CastExpr::getSubExpr | ( | ) | [inline] |
Definition at line 2712 of file Expr.h.
Referenced by clang::Sema::BuildCXXMemberCallExpr(), clang::canDynamicCastThrow(), clang::CodeGen::CodeGenFunction::EmitCastLValue(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), clang::ento::StoreManager::evalDerivedToBase(), EvalVal(), clang::CallExpr::getBuiltinCallee(), clang::ento::SValBuilder::getConstantVal(), clang::CXXFunctionalCastExpr::getLocEnd(), clang::ObjCBridgedCastExpr::getLocEnd(), clang::ImplicitCastExpr::getLocEnd(), clang::CStyleCastExpr::getLocEnd(), clang::ImplicitCastExpr::getLocStart(), clang::CodeGen::CGCXXABI::getMemberPointerAdjustment(), getSubExprAsWritten(), GetUnreachableLoc(), clang::Expr::HasSideEffects(), clang::CXXDynamicCastExpr::isAlwaysNull(), clang::Expr::isConstantInitializer(), clang::arcmt::trans::isPlusOne(), clang::Expr::isUnusedResultAWarning(), maybeRebuildARCConsumingStmt(), shouldExtendReceiverForInnerPointerMessage(), ShouldNullCheckClassCastValue(), clang::TreeTransform< Derived >::TransformCXXNamedCastExpr(), clang::ento::ExprEngine::Visit(), clang::consumed::ConsumedStmtVisitor::VisitCastExpr(), clang::threadSafety::BuildLockset::VisitCastExpr(), clang::ASTNodeImporter::VisitCStyleCastExpr(), clang::ASTNodeImporter::VisitImplicitCastExpr(), and warnOnSizeofOnArrayDecay().
const Expr* clang::CastExpr::getSubExpr | ( | ) | const [inline] |
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().
path_iterator clang::CastExpr::path_begin | ( | ) | [inline] |
Definition at line 2728 of file Expr.h.
Referenced by dumpBasePath(), clang::CodeGen::CodeGenFunction::EmitCastLValue(), clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), clang::ento::StoreManager::evalDerivedToBase(), clang::CodeGen::CGCXXABI::getMemberPointerAdjustment(), and HandleLValueBasePath().
path_const_iterator clang::CastExpr::path_begin | ( | ) | const [inline] |
bool clang::CastExpr::path_empty | ( | ) | const [inline] |
Definition at line 2726 of file Expr.h.
References clang::Stmt::CastExprBits.
Referenced by dumpBasePath(), and ImportCastPath().
path_iterator clang::CastExpr::path_end | ( | ) | [inline] |
Definition at line 2729 of file Expr.h.
References path_size().
Referenced by dumpBasePath(), clang::CodeGen::CodeGenFunction::EmitCastLValue(), clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), clang::ento::StoreManager::evalDerivedToBase(), clang::CodeGen::CGCXXABI::getMemberPointerAdjustment(), and HandleLValueBasePath().
path_const_iterator clang::CastExpr::path_end | ( | ) | const [inline] |
Definition at line 2731 of file Expr.h.
References path_size().
unsigned clang::CastExpr::path_size | ( | ) | const [inline] |
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 | ) |
Definition at line 1719 of file Expr.cpp.
Referenced by clang::CXXStaticCastExpr::Create(), clang::CXXDynamicCastExpr::Create(), clang::CXXReinterpretCastExpr::Create(), clang::CXXFunctionalCastExpr::Create(), clang::ImplicitCastExpr::Create(), and clang::CStyleCastExpr::Create().
void clang::CastExpr::setSubExpr | ( | Expr * | E | ) | [inline] |