class PseudoObjectExpr

Declaration

class PseudoObjectExpr : public Expr, private TrailingObjects { /* full declaration omitted */ };

Description

PseudoObjectExpr - An expression which accesses a pseudo-object l-value. A pseudo-object is an abstract object, accesses to which are translated to calls. The pseudo-object expression has a syntactic form, which shows how the expression was actually written in the source code, and a semantic form, which is a series of expressions to be executed in order which detail how the operation is actually evaluated. Optionally, one of the semantic forms may also provide a result value for the expression. If any of the semantic-form expressions is an OpaqueValueExpr, that OVE is required to have a source expression, and it is bound to the result of that source expression. Such OVEs may appear only in subsequent semantic-form expressions and as sub-expressions of the syntactic form. PseudoObjectExpr should be used only when an operation can be usefully described in terms of fairly simple rewrite rules on objects and functions that are meant to be used by end-developers. For example, under the Itanium ABI, dynamic casts are implemented as a call to a runtime function called __dynamic_cast; using this class to describe that would be inappropriate because that call is not really part of the user-visible semantics, and instead the cast is properly reflected in the AST and IR-generation has been taught to generate the call as necessary. In contrast, an Objective-C property access is semantically defined to be equivalent to a particular message send, and this is very much part of the user model. The name of this class encourages this modelling design.

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

Inherits from: Expr, TrailingObjects

Member Variables

Inherited from Stmt:

protected

Method Overview

  • public static clang::PseudoObjectExpr * Create(const clang::ASTContext & Context, clang::Expr * syntactic, ArrayRef<clang::Expr *> semantic, unsigned int resultIndex)
  • public static clang::PseudoObjectExpr * Create(const clang::ASTContext & Context, clang::Stmt::EmptyShell shell, unsigned int numSemanticExprs)
  • private PseudoObjectExpr(clang::QualType type, clang::ExprValueKind VK, clang::Expr * syntactic, ArrayRef<clang::Expr *> semantic, unsigned int resultIndex)
  • private PseudoObjectExpr(clang::Stmt::EmptyShell shell, unsigned int numSemanticExprs)
  • public clang::Stmt::const_child_range children() const
  • public clang::Stmt::child_range children()
  • public static bool classof(const clang::Stmt * T)
  • public clang::SourceLocation getBeginLoc() const
  • public clang::SourceLocation getEndLoc() const
  • public clang::SourceLocation getExprLoc() const
  • public unsigned int getNumSemanticExprs() const
  • private unsigned int getNumSubExprs() const
  • public clang::Expr * getResultExpr()
  • public const clang::Expr * getResultExpr() const
  • public unsigned int getResultExprIndex() const
  • public const clang::Expr * getSemanticExpr(unsigned int index) const
  • public clang::Expr * getSemanticExpr(unsigned int index)
  • private const clang::Expr *const * getSubExprsBuffer() const
  • private clang::Expr ** getSubExprsBuffer()
  • public const clang::Expr * getSyntacticForm() const
  • public clang::Expr * getSyntacticForm()
  • public llvm::iterator_range<const_semantics_iterator> semantics() const
  • public llvm::iterator_range<semantics_iterator> semantics()
  • public clang::PseudoObjectExpr::const_semantics_iterator semantics_begin() const
  • public clang::PseudoObjectExpr::semantics_iterator semantics_begin()
  • public clang::PseudoObjectExpr::const_semantics_iterator semantics_end() const
  • public clang::PseudoObjectExpr::semantics_iterator semantics_end()

Inherited from Expr:

Inherited from ValueStmt:

Inherited from Stmt:

Methods

static clang::PseudoObjectExpr* Create(
    const clang::ASTContext& Context,
    clang::Expr* syntactic,
    ArrayRef<clang::Expr*> semantic,
    unsigned int resultIndex)

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

Parameters

const clang::ASTContext& Context
clang::Expr* syntactic
ArrayRef<clang::Expr*> semantic
unsigned int resultIndex

static clang::PseudoObjectExpr* Create(
    const clang::ASTContext& Context,
    clang::Stmt::EmptyShell shell,
    unsigned int numSemanticExprs)

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

Parameters

const clang::ASTContext& Context
clang::Stmt::EmptyShell shell
unsigned int numSemanticExprs

PseudoObjectExpr(clang::QualType type,
                 clang::ExprValueKind VK,
                 clang::Expr* syntactic,
                 ArrayRef<clang::Expr*> semantic,
                 unsigned int resultIndex)

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

Parameters

clang::QualType type
clang::ExprValueKind VK
clang::Expr* syntactic
ArrayRef<clang::Expr*> semantic
unsigned int resultIndex

PseudoObjectExpr(clang::Stmt::EmptyShell shell,
                 unsigned int numSemanticExprs)

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

Parameters

clang::Stmt::EmptyShell shell
unsigned int numSemanticExprs

clang::Stmt::const_child_range children() const

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

clang::Stmt::child_range children()

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

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

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

Parameters

const clang::Stmt* T

clang::SourceLocation getBeginLoc() const

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

clang::SourceLocation getEndLoc() const

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

clang::SourceLocation getExprLoc() const

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

unsigned int getNumSemanticExprs() const

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

unsigned int getNumSubExprs() const

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

clang::Expr* getResultExpr()

Description

Return the result-bearing expression, or null if there is none.

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

const clang::Expr* getResultExpr() const

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

unsigned int getResultExprIndex() const

Description

Return the index of the result-bearing expression into the semantics expressions, or PseudoObjectExpr::NoResult if there is none.

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

const clang::Expr* getSemanticExpr(
    unsigned int index) const

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

Parameters

unsigned int index

clang::Expr* getSemanticExpr(unsigned int index)

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

Parameters

unsigned int index

const clang::Expr* const* getSubExprsBuffer()
    const

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

clang::Expr** getSubExprsBuffer()

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

const clang::Expr* getSyntacticForm() const

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

clang::Expr* getSyntacticForm()

Description

Return the syntactic form of this expression, i.e. the expression it actually looks like. Likely to be expressed in terms of OpaqueValueExprs bound in the semantic form.

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

llvm::iterator_range<const_semantics_iterator>
semantics() const

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

llvm::iterator_range<semantics_iterator>
semantics()

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

clang::PseudoObjectExpr::const_semantics_iterator
semantics_begin() const

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

clang::PseudoObjectExpr::semantics_iterator
semantics_begin()

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

clang::PseudoObjectExpr::const_semantics_iterator
semantics_end() const

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

clang::PseudoObjectExpr::semantics_iterator
semantics_end()

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