clang API Documentation
#include <Expr.h>
Public Types | |
enum | OnStack_t { OnStack } |
Public Member Functions | |
ImplicitCastExpr (OnStack_t _, QualType ty, CastKind kind, Expr *op, ExprValueKind VK) | |
SourceLocation | getLocStart () const LLVM_READONLY |
SourceLocation | getLocEnd () const LLVM_READONLY |
Static Public Member Functions | |
static ImplicitCastExpr * | Create (const ASTContext &Context, QualType T, CastKind Kind, Expr *Operand, const CXXCastPath *BasePath, ExprValueKind Cat) |
static ImplicitCastExpr * | CreateEmpty (const ASTContext &Context, unsigned PathSize) |
static bool | classof (const Stmt *T) |
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct representation in the original source code. For example: converting T[]->T*, void f()->void (*f)(), float->double, short->int, etc.
In C, implicit casts always produce rvalues. However, in C++, an implicit cast whose result is being bound to a reference will be an lvalue or xvalue. For example:
clang::ImplicitCastExpr::ImplicitCastExpr | ( | OnStack_t | _, |
QualType | ty, | ||
CastKind | kind, | ||
Expr * | op, | ||
ExprValueKind | VK | ||
) | [inline] |
static bool clang::ImplicitCastExpr::classof | ( | const Stmt * | T | ) | [inline, static] |
Reimplemented from clang::CastExpr.
Definition at line 2797 of file Expr.h.
References clang::Stmt::getStmtClass().
ImplicitCastExpr * ImplicitCastExpr::Create | ( | const ASTContext & | Context, |
QualType | T, | ||
CastKind | Kind, | ||
Expr * | Operand, | ||
const CXXCastPath * | BasePath, | ||
ExprValueKind | Cat | ||
) | [static] |
Definition at line 1724 of file Expr.cpp.
References clang::ASTContext::Allocate(), and clang::CastExpr::setCastPath().
Referenced by clang::Sema::ActOnEnumBody(), clang::Sema::ActOnPropertyImplDecl(), adjustBlockReturnsToEnum(), clang::Sema::BuildCallToObjectOfClassType(), BuildCXXCastArgument(), clang::Sema::BuildObjCBridgedCast(), clang::Sema::CheckObjCARCConversion(), clang::Sema::DefaultLvalueConversion(), clang::Sema::DefineImplicitLambdaToBlockPointerConversion(), diagnoseNoViableConversion(), clang::Sema::FixOverloadedFunctionReference(), clang::Sema::ImpCastExprToType(), clang::Sema::MaybeBindToTemporary(), maybeExtendBlockObject(), clang::InitializationSequence::Perform(), clang::Sema::PerformMoveOrCopyInitialization(), recordConversion(), and clang::ASTNodeImporter::VisitImplicitCastExpr().
ImplicitCastExpr * ImplicitCastExpr::CreateEmpty | ( | const ASTContext & | Context, |
unsigned | PathSize | ||
) | [static] |
Definition at line 1737 of file Expr.cpp.
References clang::ASTContext::Allocate().
SourceLocation clang::ImplicitCastExpr::getLocEnd | ( | ) | const [inline] |
Reimplemented from clang::Stmt.
Definition at line 2793 of file Expr.h.
References clang::Stmt::getLocEnd(), and clang::CastExpr::getSubExpr().
SourceLocation clang::ImplicitCastExpr::getLocStart | ( | ) | const [inline] |
Reimplemented from clang::Stmt.
Definition at line 2790 of file Expr.h.
References clang::Stmt::getLocStart(), and clang::CastExpr::getSubExpr().