class ImplicitCastExpr

Declaration

class ImplicitCastExpr : public CastExpr, private TrailingObjects { /* full declaration omitted */ };

Description

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:

Declared at: clang/include/clang/AST/Expr.h:3619

Inherits from: CastExpr, TrailingObjects

Member Variables

Inherited from Stmt:

protected

Method Overview

  • public static clang::ImplicitCastExpr * Create(const clang::ASTContext & Context, clang::QualType T, clang::CastKind Kind, clang::Expr * Operand, const clang::CXXCastPath * BasePath, clang::ExprValueKind Cat, clang::FPOptionsOverride FPO)
  • public static clang::ImplicitCastExpr * CreateEmpty(const clang::ASTContext & Context, unsigned int PathSize, bool HasFPFeatures)
  • private ImplicitCastExpr(clang::QualType ty, clang::CastKind kind, clang::Expr * op, unsigned int BasePathLength, clang::FPOptionsOverride FPO, clang::ExprValueKind VK)
  • private ImplicitCastExpr(clang::Stmt::EmptyShell Shell, unsigned int PathSize, bool HasFPFeatures)
  • public ImplicitCastExpr(clang::ImplicitCastExpr::OnStack_t _, clang::QualType ty, clang::CastKind kind, clang::Expr * op, clang::ExprValueKind VK, clang::FPOptionsOverride FPO)
  • public static bool classof(const clang::Stmt * T)
  • public clang::SourceLocation getBeginLoc() const
  • public clang::SourceLocation getEndLoc() const
  • public bool isPartOfExplicitCast() const
  • private unsigned int numTrailingObjects(OverloadToken<clang::CXXBaseSpecifier *>) const
  • public void setIsPartOfExplicitCast(bool PartOfExplicitCast)

Inherited from CastExpr:

Inherited from Expr:

Inherited from ValueStmt:

Inherited from Stmt:

Methods

static clang::ImplicitCastExpr* Create(
    const clang::ASTContext& Context,
    clang::QualType T,
    clang::CastKind Kind,
    clang::Expr* Operand,
    const clang::CXXCastPath* BasePath,
    clang::ExprValueKind Cat,
    clang::FPOptionsOverride FPO)

Declared at: clang/include/clang/AST/Expr.h:3658

Parameters

const clang::ASTContext& Context
clang::QualType T
clang::CastKind Kind
clang::Expr* Operand
const clang::CXXCastPath* BasePath
clang::ExprValueKind Cat
clang::FPOptionsOverride FPO

static clang::ImplicitCastExpr* CreateEmpty(
    const clang::ASTContext& Context,
    unsigned int PathSize,
    bool HasFPFeatures)

Declared at: clang/include/clang/AST/Expr.h:3663

Parameters

const clang::ASTContext& Context
unsigned int PathSize
bool HasFPFeatures

ImplicitCastExpr(clang::QualType ty,
                 clang::CastKind kind,
                 clang::Expr* op,
                 unsigned int BasePathLength,
                 clang::FPOptionsOverride FPO,
                 clang::ExprValueKind VK)

Declared at: clang/include/clang/AST/Expr.h:3624

Parameters

clang::QualType ty
clang::CastKind kind
clang::Expr* op
unsigned int BasePathLength
clang::FPOptionsOverride FPO
clang::ExprValueKind VK

ImplicitCastExpr(clang::Stmt::EmptyShell Shell,
                 unsigned int PathSize,
                 bool HasFPFeatures)

Description

Construct an empty implicit cast.

Declared at: clang/include/clang/AST/Expr.h:3635

Parameters

clang::Stmt::EmptyShell Shell
unsigned int PathSize
bool HasFPFeatures

ImplicitCastExpr(
    clang::ImplicitCastExpr::OnStack_t _,
    clang::QualType ty,
    clang::CastKind kind,
    clang::Expr* op,
    clang::ExprValueKind VK,
    clang::FPOptionsOverride FPO)

Declared at: clang/include/clang/AST/Expr.h:3645

Parameters

clang::ImplicitCastExpr::OnStack_t _
clang::QualType ty
clang::CastKind kind
clang::Expr* op
clang::ExprValueKind VK
clang::FPOptionsOverride FPO

static bool classof(const clang::Stmt* T)

Declared at: clang/include/clang/AST/Expr.h:3673

Parameters

const clang::Stmt* T

clang::SourceLocation getBeginLoc() const

Declared at: clang/include/clang/AST/Expr.h:3666

clang::SourceLocation getEndLoc() const

Declared at: clang/include/clang/AST/Expr.h:3669

bool isPartOfExplicitCast() const

Declared at: clang/include/clang/AST/Expr.h:3653

unsigned int numTrailingObjects(
    OverloadToken<clang::CXXBaseSpecifier*>) const

Declared at: clang/include/clang/AST/Expr.h:3639

Parameters

OverloadToken<clang::CXXBaseSpecifier*>

void setIsPartOfExplicitCast(
    bool PartOfExplicitCast)

Declared at: clang/include/clang/AST/Expr.h:3654

Parameters

bool PartOfExplicitCast