class ConstantExpr

Declaration

class ConstantExpr : public FullExpr, private TrailingObjects { /* full declaration omitted */ };

Description

ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluating the expression.

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

Inherits from: FullExpr, TrailingObjects

Member Variables

Inherited from FullExpr:

protected SubExpr

Inherited from Stmt:

protected

Method Overview

  • private clang::APValue & APValueResult()
  • private clang::APValue & APValueResult() const
  • private ConstantExpr(clang::Expr * SubExpr, clang::ConstantExpr::ResultStorageKind StorageKind, bool IsImmediateInvocation)
  • private ConstantExpr(clang::Stmt::EmptyShell Empty, clang::ConstantExpr::ResultStorageKind StorageKind)
  • public static clang::ConstantExpr * Create(const clang::ASTContext & Context, clang::Expr * E, const clang::APValue & Result)
  • public static clang::ConstantExpr * Create(const clang::ASTContext & Context, clang::Expr * E, clang::ConstantExpr::ResultStorageKind Storage = RSK_None, bool IsImmediateInvocation = false)
  • public static clang::ConstantExpr * CreateEmpty(const clang::ASTContext & Context, clang::ConstantExpr::ResultStorageKind StorageKind)
  • private uint64_t & Int64Result()
  • private const uint64_t & Int64Result() const
  • public void MoveIntoResult(clang::APValue & Value, const clang::ASTContext & Context)
  • public void SetResult(clang::APValue Value, const clang::ASTContext & Context)
  • public clang::Stmt::const_child_range children() const
  • public clang::Stmt::child_range children()
  • public static bool classof(const clang::Stmt * T)
  • public clang::APValue getAPValueResult() const
  • public clang::SourceLocation getBeginLoc() const
  • public clang::SourceLocation getEndLoc() const
  • public APValue::ValueKind getResultAPValueKind() const
  • public llvm::APSInt getResultAsAPSInt() const
  • public clang::APValue & getResultAsAPValue() const
  • public clang::ConstantExpr::ResultStorageKind getResultStorageKind() const
  • public static clang::ConstantExpr::ResultStorageKind getStorageKind(const clang::Type * T, const clang::ASTContext & Context)
  • public static clang::ConstantExpr::ResultStorageKind getStorageKind(const clang::APValue & Value)
  • public bool hasAPValueResult() const
  • public bool isImmediateInvocation() const
  • private size_t numTrailingObjects(OverloadToken<clang::APValue>) const
  • private size_t numTrailingObjects(OverloadToken<uint64_t>) const

Inherited from FullExpr:

Inherited from Expr:

Inherited from ValueStmt:

Inherited from Stmt:

Methods

clang::APValue& APValueResult()

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

clang::APValue& APValueResult() const

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

ConstantExpr(
    clang::Expr* SubExpr,
    clang::ConstantExpr::ResultStorageKind
        StorageKind,
    bool IsImmediateInvocation)

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

Parameters

clang::Expr* SubExpr
clang::ConstantExpr::ResultStorageKind StorageKind
bool IsImmediateInvocation

ConstantExpr(
    clang::Stmt::EmptyShell Empty,
    clang::ConstantExpr::ResultStorageKind
        StorageKind)

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

Parameters

clang::Stmt::EmptyShell Empty
clang::ConstantExpr::ResultStorageKind StorageKind

static clang::ConstantExpr* Create(
    const clang::ASTContext& Context,
    clang::Expr* E,
    const clang::APValue& Result)

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

Parameters

const clang::ASTContext& Context
clang::Expr* E
const clang::APValue& Result

static clang::ConstantExpr* Create(
    const clang::ASTContext& Context,
    clang::Expr* E,
    clang::ConstantExpr::ResultStorageKind
        Storage = RSK_None,
    bool IsImmediateInvocation = false)

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

Parameters

const clang::ASTContext& Context
clang::Expr* E
clang::ConstantExpr::ResultStorageKind Storage = RSK_None
bool IsImmediateInvocation = false

static clang::ConstantExpr* CreateEmpty(
    const clang::ASTContext& Context,
    clang::ConstantExpr::ResultStorageKind
        StorageKind)

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

Parameters

const clang::ASTContext& Context
clang::ConstantExpr::ResultStorageKind StorageKind

uint64_t& Int64Result()

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

const uint64_t& Int64Result() const

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

void MoveIntoResult(
    clang::APValue& Value,
    const clang::ASTContext& Context)

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

Parameters

clang::APValue& Value
const clang::ASTContext& Context

void SetResult(clang::APValue Value,
               const clang::ASTContext& Context)

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

Parameters

clang::APValue Value
const clang::ASTContext& Context

clang::Stmt::const_child_range children() const

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

clang::Stmt::child_range children()

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

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

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

Parameters

const clang::Stmt* T

clang::APValue getAPValueResult() const

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

clang::SourceLocation getBeginLoc() const

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

clang::SourceLocation getEndLoc() const

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

APValue::ValueKind getResultAPValueKind() const

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

llvm::APSInt getResultAsAPSInt() const

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

clang::APValue& getResultAsAPValue() const

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

clang::ConstantExpr::ResultStorageKind
getResultStorageKind() const

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

static clang::ConstantExpr::ResultStorageKind
getStorageKind(const clang::Type* T,
               const clang::ASTContext& Context)

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

Parameters

const clang::Type* T
const clang::ASTContext& Context

static clang::ConstantExpr::ResultStorageKind
getStorageKind(const clang::APValue& Value)

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

Parameters

const clang::APValue& Value

bool hasAPValueResult() const

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

bool isImmediateInvocation() const

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

size_t numTrailingObjects(
    OverloadToken<clang::APValue>) const

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

Parameters

OverloadToken<clang::APValue>

size_t numTrailingObjects(
    OverloadToken<uint64_t>) const

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

Parameters

OverloadToken<uint64_t>