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:
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:
- public Classify
- public ClassifyLValue
- public ClassifyModifiable
- public EvaluateAsBooleanCondition
- public EvaluateAsConstantExpr
- public EvaluateAsFixedPoint
- public EvaluateAsFloat
- public EvaluateAsInitializer
- public EvaluateAsInt
- public EvaluateAsLValue
- public EvaluateAsRValue
- public EvaluateForOverflow
- public EvaluateKnownConstInt
- public EvaluateKnownConstIntCheckOverflow
- public EvaluateWithSubstitution
- public HasSideEffects
- public IgnoreCasts
- public IgnoreCasts
- public IgnoreConversionOperatorSingleStep
- public IgnoreConversionOperatorSingleStep
- public IgnoreImpCasts
- public IgnoreImpCasts
- public IgnoreImplicit
- public IgnoreImplicit
- public IgnoreImplicitAsWritten
- public IgnoreImplicitAsWritten
- public IgnoreParenBaseCasts
- public IgnoreParenBaseCasts
- public IgnoreParenCasts
- public IgnoreParenCasts
- public IgnoreParenImpCasts
- public IgnoreParenImpCasts
- public IgnoreParenLValueCasts
- public IgnoreParenLValueCasts
- public IgnoreParenNoopCasts
- public IgnoreParenNoopCasts
- public IgnoreParens
- public IgnoreParens
- public IgnoreUnlessSpelledInSource
- public IgnoreUnlessSpelledInSource
- public classof
- public containsErrors
- public containsUnexpandedParameterPack
- public findBoundMemberType
- public getAsBuiltinConstantDeclRef
- public getBestDynamicClassType
- public getBestDynamicClassTypeExpr
- public getDependence
- public getExprLoc
- public getFPFeaturesInEffect
- public getIntegerConstantExpr
- public getObjCProperty
- public getObjectKind
- public getReferencedDeclOfCallee
- public getReferencedDeclOfCallee
- public getSourceBitField
- public getSourceBitField
- public getType
- public getValueKind
- public getValueKindForType
- public hasAnyTypeDependentArguments
- public hasNonTrivialCall
- public hasPlaceholderType
- public hasPlaceholderType
- public isBoundMemberFunction
- public isCXX11ConstantExpr
- public isCXX98IntegralConstantExpr
- public isConstantInitializer
- public isDefaultArgument
- public isEvaluatable
- public isGLValue
- public isImplicitCXXThis
- public isInstantiationDependent
- public isIntegerConstantExpr
- public isKnownToHaveBooleanValue
- public isLValue
- public isModifiableLvalue
- public isNullPointerConstant
- public isOBJCGCCandidate
- public isObjCSelfExpr
- public isOrdinaryOrBitFieldObject
- public isPRValue
- public isPotentialConstantExpr
- public isPotentialConstantExprUnevaluated
- public isReadIfDiscardedInCPlusPlus11
- public isSameComparisonOperand
- public isTemporaryObject
- public isTypeDependent
- public isUnusedResultAWarning
- public isValueDependent
- public isXValue
- public refersToBitField
- public refersToGlobalRegisterVar
- public refersToMatrixElement
- public refersToVectorElement
- protected setDependence
- public setObjectKind
- public setType
- public setValueKind
- public skipRValueSubobjectAdjustments
- public skipRValueSubobjectAdjustments
- public tryEvaluateObjectSize
- public tryEvaluateStrLen
Inherited from ValueStmt:
Inherited from Stmt:
- public EnableStatistics
- public IgnoreContainers
- public IgnoreContainers
- public PrintStats
- public ProcessODRHash
- public Profile
- public addStmtClass
- public child_begin
- public child_begin
- public child_end
- public child_end
- public children
- public children
- public determineLikelihoodConflict
- public dump
- public dump
- public dumpColor
- public dumpPretty
- public getBeginLoc
- public getEndLoc
- public getID
- public getLikelihood
- public getLikelihood
- public getLikelihood
- public getLikelihoodAttr
- public getSourceRange
- public getStmtClass
- public getStmtClassName
- public printJson
- public printPretty
- public printPrettyControlled
- public stripLabelLikeStatements
- public stripLabelLikeStatements
- public viewAST
Methods
¶static clang::PseudoObjectExpr* Create(
const clang::ASTContext& Context,
clang::Expr* syntactic,
ArrayRef<clang::Expr*> semantic,
unsigned int resultIndex)
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)
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)
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)
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
clang::Stmt::const_child_range children() const
Declared at: clang/include/clang/AST/Expr.h:6213
¶clang::Stmt::child_range children()
clang::Stmt::child_range children()
Declared at: clang/include/clang/AST/Expr.h:6207
¶static bool classof(const clang::Stmt* T)
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
clang::SourceLocation getBeginLoc() const
Declared at: clang/include/clang/AST/Expr.h:6200
¶clang::SourceLocation getEndLoc() const
clang::SourceLocation getEndLoc() const
Declared at: clang/include/clang/AST/Expr.h:6203
¶clang::SourceLocation getExprLoc() const
clang::SourceLocation getExprLoc() const
Declared at: clang/include/clang/AST/Expr.h:6196
¶unsigned int getNumSemanticExprs() const
unsigned int getNumSemanticExprs() const
Declared at: clang/include/clang/AST/Expr.h:6164
¶unsigned int getNumSubExprs() const
unsigned int getNumSubExprs() const
Declared at: clang/include/clang/AST/Expr.h:6125
¶clang::Expr* getResultExpr()
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
const clang::Expr* getResultExpr() const
Declared at: clang/include/clang/AST/Expr.h:6160
¶unsigned int getResultExprIndex() const
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
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)
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
const clang::Expr* const* getSubExprsBuffer()
const
Declared at: clang/include/clang/AST/Expr.h:6115
¶clang::Expr** getSubExprsBuffer()
clang::Expr** getSubExprsBuffer()
Declared at: clang/include/clang/AST/Expr.h:6114
¶const clang::Expr* getSyntacticForm() const
const clang::Expr* getSyntacticForm() const
Declared at: clang/include/clang/AST/Expr.h:6145
¶clang::Expr* getSyntacticForm()
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
llvm::iterator_range<const_semantics_iterator>
semantics() const
Declared at: clang/include/clang/AST/Expr.h:6184
¶llvm::iterator_range<semantics_iterator>
semantics()
llvm::iterator_range<semantics_iterator>
semantics()
Declared at: clang/include/clang/AST/Expr.h:6181
¶clang::PseudoObjectExpr::const_semantics_iterator
semantics_begin() const
clang::PseudoObjectExpr::const_semantics_iterator
semantics_begin() const
Declared at: clang/include/clang/AST/Expr.h:6171
¶clang::PseudoObjectExpr::semantics_iterator
semantics_begin()
clang::PseudoObjectExpr::semantics_iterator
semantics_begin()
Declared at: clang/include/clang/AST/Expr.h:6168
¶clang::PseudoObjectExpr::const_semantics_iterator
semantics_end() const
clang::PseudoObjectExpr::const_semantics_iterator
semantics_end() const
Declared at: clang/include/clang/AST/Expr.h:6177
¶clang::PseudoObjectExpr::semantics_iterator
semantics_end()
clang::PseudoObjectExpr::semantics_iterator
semantics_end()
Declared at: clang/include/clang/AST/Expr.h:6174