class Expr
Declaration
class Expr : public ValueStmt { /* full declaration omitted */ };
Description
This represents one expression. Note that Expr's are subclasses of Stmt. This allows an expression to be transparently used any place a Stmt is required.
Declared at: clang/include/clang/AST/Expr.h:109
Inherits from: ValueStmt
Member Variables
- private clang::QualType TR
Inherited from Stmt:
Method Overview
- public clang::Expr::Classification Classify(clang::ASTContext & Ctx) const
- private clang::Expr::Classification ClassifyImpl(clang::ASTContext & Ctx, clang::SourceLocation * Loc) const
- public clang::Expr::LValueClassification ClassifyLValue(clang::ASTContext & Ctx) const
- public clang::Expr::Classification ClassifyModifiable(clang::ASTContext & Ctx, clang::SourceLocation & Loc) const
- public bool EvaluateAsBooleanCondition(bool & Result, const clang::ASTContext & Ctx, bool InConstantContext = false) const
- public bool EvaluateAsConstantExpr(clang::Expr::EvalResult & Result, const clang::ASTContext & Ctx, clang::Expr::ConstantExprKind Kind = ConstantExprKind::Normal) const
- public bool EvaluateAsFixedPoint(clang::Expr::EvalResult & Result, const clang::ASTContext & Ctx, clang::Expr::SideEffectsKind AllowSideEffects = SE_NoSideEffects, bool InConstantContext = false) const
- public bool EvaluateAsFloat(llvm::APFloat & Result, const clang::ASTContext & Ctx, clang::Expr::SideEffectsKind AllowSideEffects = SE_NoSideEffects, bool InConstantContext = false) const
- public bool EvaluateAsInitializer(clang::APValue & Result, const clang::ASTContext & Ctx, const clang::VarDecl * VD, SmallVectorImpl<clang::PartialDiagnosticAt> & Notes, bool IsConstantInitializer) const
- public bool EvaluateAsInt(clang::Expr::EvalResult & Result, const clang::ASTContext & Ctx, clang::Expr::SideEffectsKind AllowSideEffects = SE_NoSideEffects, bool InConstantContext = false) const
- public bool EvaluateAsLValue(clang::Expr::EvalResult & Result, const clang::ASTContext & Ctx, bool InConstantContext = false) const
- public bool EvaluateAsRValue(clang::Expr::EvalResult & Result, const clang::ASTContext & Ctx, bool InConstantContext = false) const
- public void EvaluateForOverflow(const clang::ASTContext & Ctx) const
- public llvm::APSInt EvaluateKnownConstInt(const clang::ASTContext & Ctx, SmallVectorImpl<clang::PartialDiagnosticAt> * Diag = nullptr) const
- public llvm::APSInt EvaluateKnownConstIntCheckOverflow(const clang::ASTContext & Ctx, SmallVectorImpl<clang::PartialDiagnosticAt> * Diag = nullptr) const
- public bool EvaluateWithSubstitution(clang::APValue & Value, clang::ASTContext & Ctx, const clang::FunctionDecl * Callee, ArrayRef<const clang::Expr *> Args, const clang::Expr * This = nullptr) const
- public Expr(const clang::Expr &)
- protected Expr(clang::Stmt::StmtClass SC, clang::Stmt::EmptyShell)
- protected Expr(clang::Stmt::StmtClass SC, clang::QualType T, clang::ExprValueKind VK, clang::ExprObjectKind OK)
- public Expr(clang::Expr &&)
- public Expr()
- public bool HasSideEffects(const clang::ASTContext & Ctx, bool IncludePossibleEffects = true) const
- public clang::Expr * IgnoreCasts()
- public const clang::Expr * IgnoreCasts() const
- public const clang::Expr * IgnoreConversionOperatorSingleStep() const
- public clang::Expr * IgnoreConversionOperatorSingleStep()
- public clang::Expr * IgnoreImpCasts()
- public const clang::Expr * IgnoreImpCasts() const
- public clang::Expr * IgnoreImplicit()
- public const clang::Expr * IgnoreImplicit() const
- public clang::Expr * IgnoreImplicitAsWritten()
- public const clang::Expr * IgnoreImplicitAsWritten() const
- public clang::Expr * IgnoreParenBaseCasts()
- public const clang::Expr * IgnoreParenBaseCasts() const
- public const clang::Expr * IgnoreParenCasts() const
- public clang::Expr * IgnoreParenCasts()
- public const clang::Expr * IgnoreParenImpCasts() const
- public clang::Expr * IgnoreParenImpCasts()
- public const clang::Expr * IgnoreParenLValueCasts() const
- public clang::Expr * IgnoreParenLValueCasts()
- public const clang::Expr * IgnoreParenNoopCasts(const clang::ASTContext & Ctx) const
- public clang::Expr * IgnoreParenNoopCasts(const clang::ASTContext & Ctx)
- public const clang::Expr * IgnoreParens() const
- public clang::Expr * IgnoreParens()
- public clang::Expr * IgnoreUnlessSpelledInSource()
- public const clang::Expr * IgnoreUnlessSpelledInSource() const
- public static bool classof(const clang::Stmt * T)
- public bool containsErrors() const
- public bool containsUnexpandedParameterPack() const
- public static clang::QualType findBoundMemberType(const clang::Expr * expr)
- public const clang::ValueDecl * getAsBuiltinConstantDeclRef(const clang::ASTContext & Context) const
- public const clang::CXXRecordDecl * getBestDynamicClassType() const
- public const clang::Expr * getBestDynamicClassTypeExpr() const
- public clang::ExprDependence getDependence() const
- public clang::SourceLocation getExprLoc() const
- public clang::FPOptions getFPFeaturesInEffect(const clang::LangOptions & LO) const
- public Optional<llvm::APSInt> getIntegerConstantExpr(const clang::ASTContext & Ctx, clang::SourceLocation * Loc = nullptr, bool isEvaluated = true) const
- public const clang::ObjCPropertyRefExpr * getObjCProperty() const
- public clang::ExprObjectKind getObjectKind() const
- public clang::Decl * getReferencedDeclOfCallee()
- public const clang::Decl * getReferencedDeclOfCallee() const
- public const clang::FieldDecl * getSourceBitField() const
- public clang::FieldDecl * getSourceBitField()
- public clang::QualType getType() const
- public clang::ExprValueKind getValueKind() const
- public static clang::ExprValueKind getValueKindForType(clang::QualType T)
- public static bool hasAnyTypeDependentArguments(ArrayRef<clang::Expr *> Exprs)
- public bool hasNonTrivialCall(const clang::ASTContext & Ctx) const
- public bool hasPlaceholderType() const
- public bool hasPlaceholderType(BuiltinType::Kind K) const
- public bool isBoundMemberFunction(clang::ASTContext & Ctx) const
- public bool isCXX11ConstantExpr(const clang::ASTContext & Ctx, clang::APValue * Result = nullptr, clang::SourceLocation * Loc = nullptr) const
- public bool isCXX98IntegralConstantExpr(const clang::ASTContext & Ctx) const
- public bool isConstantInitializer(clang::ASTContext & Ctx, bool ForRef, const clang::Expr ** Culprit = nullptr) const
- public bool isDefaultArgument() const
- public bool isEvaluatable(const clang::ASTContext & Ctx, clang::Expr::SideEffectsKind AllowSideEffects = SE_NoSideEffects) const
- public bool isGLValue() const
- public bool isImplicitCXXThis() const
- public bool isInstantiationDependent() const
- public bool isIntegerConstantExpr(const clang::ASTContext & Ctx, clang::SourceLocation * Loc = nullptr) const
- public bool isKnownToHaveBooleanValue(bool Semantic = true) const
- public bool isLValue() const
- public clang::Expr::isModifiableLvalueResult isModifiableLvalue(clang::ASTContext & Ctx, clang::SourceLocation * Loc = nullptr) const
- public clang::Expr::NullPointerConstantKind isNullPointerConstant(clang::ASTContext & Ctx, clang::Expr::NullPointerConstantValueDependence NPC) const
- public bool isOBJCGCCandidate(clang::ASTContext & Ctx) const
- public bool isObjCSelfExpr() const
- public bool isOrdinaryOrBitFieldObject() const
- public bool isPRValue() const
- public static bool isPotentialConstantExpr(const clang::FunctionDecl * FD, SmallVectorImpl<clang::PartialDiagnosticAt> & Diags)
- public static bool isPotentialConstantExprUnevaluated(clang::Expr * E, const clang::FunctionDecl * FD, SmallVectorImpl<clang::PartialDiagnosticAt> & Diags)
- public bool isReadIfDiscardedInCPlusPlus11() const
- public static bool isSameComparisonOperand(const clang::Expr * E1, const clang::Expr * E2)
- public bool isTemporaryObject(clang::ASTContext & Ctx, const clang::CXXRecordDecl * TempTy) const
- public bool isTypeDependent() const
- public bool isUnusedResultAWarning(const clang::Expr *& WarnExpr, clang::SourceLocation & Loc, clang::SourceRange & R1, clang::SourceRange & R2, clang::ASTContext & Ctx) const
- public bool isValueDependent() const
- public bool isXValue() const
- public bool refersToBitField() const
- public bool refersToGlobalRegisterVar() const
- public bool refersToMatrixElement() const
- public bool refersToVectorElement() const
- protected void setDependence(clang::ExprDependence Deps)
- public void setObjectKind(clang::ExprObjectKind Cat)
- public void setType(clang::QualType t)
- public void setValueKind(clang::ExprValueKind Cat)
- public const clang::Expr * skipRValueSubobjectAdjustments(SmallVectorImpl<const clang::Expr *> & CommaLHS, SmallVectorImpl<clang::SubobjectAdjustment> & Adjustments) const
- public const clang::Expr * skipRValueSubobjectAdjustments() const
- public bool tryEvaluateObjectSize(uint64_t & Result, clang::ASTContext & Ctx, unsigned int Type) const
- public bool tryEvaluateStrLen(uint64_t & Result, clang::ASTContext & Ctx) const
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
¶clang::Expr::Classification Classify(
clang::ASTContext& Ctx) const
clang::Expr::Classification Classify(
clang::ASTContext& Ctx) const
Description
Classify - Classify this expression according to the C++11 expression taxonomy. C++11 defines ([basic.lval]) a new taxonomy of expressions to replace the old lvalue vs rvalue. This function determines the type of expression this is. There are three expression types: - lvalues are classical lvalues as in C++03. - prvalues are equivalent to rvalues in C++03. - xvalues are expressions yielding unnamed rvalue references, e.g. a function returning an rvalue reference. lvalues and xvalues are collectively referred to as glvalues, while prvalues and xvalues together form rvalues.
Declared at: clang/include/clang/AST/Expr.h:398
Parameters
- clang::ASTContext& Ctx
¶clang::Expr::Classification ClassifyImpl(
clang::ASTContext& Ctx,
clang::SourceLocation* Loc) const
clang::Expr::Classification ClassifyImpl(
clang::ASTContext& Ctx,
clang::SourceLocation* Loc) const
Declared at: clang/include/clang/AST/Expr.h:453
Parameters
- clang::ASTContext& Ctx
- clang::SourceLocation* Loc
¶clang::Expr::LValueClassification ClassifyLValue(
clang::ASTContext& Ctx) const
clang::Expr::LValueClassification ClassifyLValue(
clang::ASTContext& Ctx) const
Description
Reasons why an expression might not be an l-value.
Declared at: clang/include/clang/AST/Expr.h:288
Parameters
- clang::ASTContext& Ctx
¶clang::Expr::Classification ClassifyModifiable(
clang::ASTContext& Ctx,
clang::SourceLocation& Loc) const
clang::Expr::Classification ClassifyModifiable(
clang::ASTContext& Ctx,
clang::SourceLocation& Loc) const
Description
ClassifyModifiable - Classify this expression according to the C++11 expression taxonomy, and see if it is valid on the left side of an assignment. This function extends classify in that it also tests whether the expression is modifiable (C99 6.3.2.1p1).
Declared at: clang/include/clang/AST/Expr.h:410
Parameters
- clang::ASTContext& Ctx
- clang::SourceLocation& Loc
- A source location that might be filled with a relevant location if the expression is not modifiable.
¶bool EvaluateAsBooleanCondition(
bool& Result,
const clang::ASTContext& Ctx,
bool InConstantContext = false) const
bool EvaluateAsBooleanCondition(
bool& Result,
const clang::ASTContext& Ctx,
bool InConstantContext = false) const
Description
EvaluateAsBooleanCondition - Return true if this is a constant which we can fold and convert to a boolean condition using any crazy technique that we want to, even if the expression has side-effects.
Declared at: clang/include/clang/AST/Expr.h:634
Parameters
- bool& Result
- const clang::ASTContext& Ctx
- bool InConstantContext = false
¶bool EvaluateAsConstantExpr(
clang::Expr::EvalResult& Result,
const clang::ASTContext& Ctx,
clang::Expr::ConstantExprKind Kind =
ConstantExprKind::Normal) const
bool EvaluateAsConstantExpr(
clang::Expr::EvalResult& Result,
const clang::ASTContext& Ctx,
clang::Expr::ConstantExprKind Kind =
ConstantExprKind::Normal) const
Description
Evaluate an expression that is required to be a constant expression. Does not check the syntactic constraints for C and C++98 constant expressions.
Declared at: clang/include/clang/AST/Expr.h:735
Parameters
- clang::Expr::EvalResult& Result
- const clang::ASTContext& Ctx
- clang::Expr::ConstantExprKind Kind = ConstantExprKind::Normal
¶bool EvaluateAsFixedPoint(
clang::Expr::EvalResult& Result,
const clang::ASTContext& Ctx,
clang::Expr::SideEffectsKind
AllowSideEffects = SE_NoSideEffects,
bool InConstantContext = false) const
bool EvaluateAsFixedPoint(
clang::Expr::EvalResult& Result,
const clang::ASTContext& Ctx,
clang::Expr::SideEffectsKind
AllowSideEffects = SE_NoSideEffects,
bool InConstantContext = false) const
Description
EvaluateAsFloat - Return true if this is a constant which we can fold and convert to a fixed point value.
Declared at: clang/include/clang/AST/Expr.h:659
Parameters
- clang::Expr::EvalResult& Result
- const clang::ASTContext& Ctx
- clang::Expr::SideEffectsKind AllowSideEffects = SE_NoSideEffects
- bool InConstantContext = false
¶bool EvaluateAsFloat(
llvm::APFloat& Result,
const clang::ASTContext& Ctx,
clang::Expr::SideEffectsKind
AllowSideEffects = SE_NoSideEffects,
bool InConstantContext = false) const
bool EvaluateAsFloat(
llvm::APFloat& Result,
const clang::ASTContext& Ctx,
clang::Expr::SideEffectsKind
AllowSideEffects = SE_NoSideEffects,
bool InConstantContext = false) const
Description
EvaluateAsFloat - Return true if this is a constant which we can fold and convert to a floating point value, using any crazy technique that we want to.
Declared at: clang/include/clang/AST/Expr.h:653
Parameters
- llvm::APFloat& Result
- const clang::ASTContext& Ctx
- clang::Expr::SideEffectsKind AllowSideEffects = SE_NoSideEffects
- bool InConstantContext = false
¶bool EvaluateAsInitializer(
clang::APValue& Result,
const clang::ASTContext& Ctx,
const clang::VarDecl* VD,
SmallVectorImpl<clang::PartialDiagnosticAt>&
Notes,
bool IsConstantInitializer) const
bool EvaluateAsInitializer(
clang::APValue& Result,
const clang::ASTContext& Ctx,
const clang::VarDecl* VD,
SmallVectorImpl<clang::PartialDiagnosticAt>&
Notes,
bool IsConstantInitializer) const
Description
EvaluateAsInitializer - Evaluate an expression as if it were the initializer of the given declaration. Returns true if the initializer can be folded to a constant, and produces any relevant notes. In C++11, notes will be produced if the expression is not a constant expression.
Declared at: clang/include/clang/AST/Expr.h:704
Parameters
- clang::APValue& Result
- const clang::ASTContext& Ctx
- const clang::VarDecl* VD
- SmallVectorImpl<clang::PartialDiagnosticAt>& Notes
- bool IsConstantInitializer
¶bool EvaluateAsInt(
clang::Expr::EvalResult& Result,
const clang::ASTContext& Ctx,
clang::Expr::SideEffectsKind
AllowSideEffects = SE_NoSideEffects,
bool InConstantContext = false) const
bool EvaluateAsInt(
clang::Expr::EvalResult& Result,
const clang::ASTContext& Ctx,
clang::Expr::SideEffectsKind
AllowSideEffects = SE_NoSideEffects,
bool InConstantContext = false) const
Description
EvaluateAsInt - Return true if this is a constant which we can fold and convert to an integer, using any crazy technique that we want to.
Declared at: clang/include/clang/AST/Expr.h:646
Parameters
- clang::Expr::EvalResult& Result
- const clang::ASTContext& Ctx
- clang::Expr::SideEffectsKind AllowSideEffects = SE_NoSideEffects
- bool InConstantContext = false
¶bool EvaluateAsLValue(
clang::Expr::EvalResult& Result,
const clang::ASTContext& Ctx,
bool InConstantContext = false) const
bool EvaluateAsLValue(
clang::Expr::EvalResult& Result,
const clang::ASTContext& Ctx,
bool InConstantContext = false) const
Description
EvaluateAsLValue - Evaluate an expression to see if we can fold it to an lvalue with link time known address, with no side-effects.
Declared at: clang/include/clang/AST/Expr.h:697
Parameters
- clang::Expr::EvalResult& Result
- const clang::ASTContext& Ctx
- bool InConstantContext = false
¶bool EvaluateAsRValue(
clang::Expr::EvalResult& Result,
const clang::ASTContext& Ctx,
bool InConstantContext = false) const
bool EvaluateAsRValue(
clang::Expr::EvalResult& Result,
const clang::ASTContext& Ctx,
bool InConstantContext = false) const
Description
EvaluateAsRValue - Return true if this is a constant which we can fold to an rvalue using any crazy technique (that has nothing to do with language standards) that we want to, even if the expression has side-effects. If this function returns true, it returns the folded constant in Result. If the expression is a glvalue, an lvalue-to-rvalue conversion will be applied.
Declared at: clang/include/clang/AST/Expr.h:627
Parameters
- clang::Expr::EvalResult& Result
- const clang::ASTContext& Ctx
- bool InConstantContext = false
¶void EvaluateForOverflow(
const clang::ASTContext& Ctx) const
void EvaluateForOverflow(
const clang::ASTContext& Ctx) const
Declared at: clang/include/clang/AST/Expr.h:693
Parameters
- const clang::ASTContext& Ctx
¶llvm::APSInt EvaluateKnownConstInt(
const clang::ASTContext& Ctx,
SmallVectorImpl<clang::PartialDiagnosticAt>*
Diag = nullptr) const
llvm::APSInt EvaluateKnownConstInt(
const clang::ASTContext& Ctx,
SmallVectorImpl<clang::PartialDiagnosticAt>*
Diag = nullptr) const
Description
EvaluateKnownConstInt - Call EvaluateAsRValue and return the folded integer. This must be called on an expression that constant folds to an integer.
Declared at: clang/include/clang/AST/Expr.h:685
Parameters
- const clang::ASTContext& Ctx
- SmallVectorImpl<clang::PartialDiagnosticAt>* Diag = nullptr
¶llvm::APSInt EvaluateKnownConstIntCheckOverflow(
const clang::ASTContext& Ctx,
SmallVectorImpl<clang::PartialDiagnosticAt>*
Diag = nullptr) const
llvm::APSInt EvaluateKnownConstIntCheckOverflow(
const clang::ASTContext& Ctx,
SmallVectorImpl<clang::PartialDiagnosticAt>*
Diag = nullptr) const
Declared at: clang/include/clang/AST/Expr.h:689
Parameters
- const clang::ASTContext& Ctx
- SmallVectorImpl<clang::PartialDiagnosticAt>* Diag = nullptr
¶bool EvaluateWithSubstitution(
clang::APValue& Value,
clang::ASTContext& Ctx,
const clang::FunctionDecl* Callee,
ArrayRef<const clang::Expr*> Args,
const clang::Expr* This = nullptr) const
bool EvaluateWithSubstitution(
clang::APValue& Value,
clang::ASTContext& Ctx,
const clang::FunctionDecl* Callee,
ArrayRef<const clang::Expr*> Args,
const clang::Expr* This = nullptr) const
Description
EvaluateWithSubstitution - Evaluate an expression as if from the context of a call to the given function with the given arguments, inside an unevaluated context. Returns true if the expression could be folded to a constant.
Declared at: clang/include/clang/AST/Expr.h:713
Parameters
- clang::APValue& Value
- clang::ASTContext& Ctx
- const clang::FunctionDecl* Callee
- ArrayRef<const clang::Expr*> Args
- const clang::Expr* This = nullptr
¶Expr(const clang::Expr&)
Expr(const clang::Expr&)
Declared at: clang/include/clang/AST/Expr.h:114
Parameters
- const clang::Expr&
¶Expr(clang::Stmt::StmtClass SC,
clang::Stmt::EmptyShell)
Expr(clang::Stmt::StmtClass SC,
clang::Stmt::EmptyShell)
Description
Construct an empty expression.
Declared at: clang/include/clang/AST/Expr.h:130
Parameters
- clang::Stmt::StmtClass SC
- clang::Stmt::EmptyShell
¶Expr(clang::Stmt::StmtClass SC,
clang::QualType T,
clang::ExprValueKind VK,
clang::ExprObjectKind OK)
Expr(clang::Stmt::StmtClass SC,
clang::QualType T,
clang::ExprValueKind VK,
clang::ExprObjectKind OK)
Declared at: clang/include/clang/AST/Expr.h:120
Parameters
- clang::Stmt::StmtClass SC
- clang::QualType T
- clang::ExprValueKind VK
- clang::ExprObjectKind OK
¶Expr(clang::Expr&&)
Expr(clang::Expr&&)
Declared at: clang/include/clang/AST/Expr.h:115
Parameters
¶Expr()
Expr()
Declared at: clang/include/clang/AST/Expr.h:113
¶bool HasSideEffects(
const clang::ASTContext& Ctx,
bool IncludePossibleEffects = true) const
bool HasSideEffects(
const clang::ASTContext& Ctx,
bool IncludePossibleEffects = true) const
Description
HasSideEffects - This routine returns true for all those expressions which have any effect other than producing a value. Example is a function call, volatile variable read, or throwing an exception. If IncludePossibleEffects is false, this call treats certain expressions with potential side effects (such as function call-like expressions, instantiation-dependent expressions, or invocations from a macro) as not having side effects.
Declared at: clang/include/clang/AST/Expr.h:675
Parameters
- const clang::ASTContext& Ctx
- bool IncludePossibleEffects = true
¶clang::Expr* IgnoreCasts()
clang::Expr* IgnoreCasts()
Description
Skip past any casts which might surround this expression until reaching a fixed point. Skips: * CastExpr * FullExpr * MaterializeTemporaryExpr * SubstNonTypeTemplateParmExpr
Declared at: clang/include/clang/AST/Expr.h:836
¶const clang::Expr* IgnoreCasts() const
const clang::Expr* IgnoreCasts() const
Declared at: clang/include/clang/AST/Expr.h:837
¶const clang::Expr*
IgnoreConversionOperatorSingleStep() const
const clang::Expr*
IgnoreConversionOperatorSingleStep() const
Declared at: clang/include/clang/AST/Expr.h:899
¶clang::Expr* IgnoreConversionOperatorSingleStep()
clang::Expr* IgnoreConversionOperatorSingleStep()
Description
Skip conversion operators. If this Expr is a call to a conversion operator, return the argument.
Declared at: clang/include/clang/AST/Expr.h:898
¶clang::Expr* IgnoreImpCasts()
clang::Expr* IgnoreImpCasts()
Description
Skip past any implicit casts which might surround this expression until reaching a fixed point. Skips: * ImplicitCastExpr * FullExpr
Declared at: clang/include/clang/AST/Expr.h:825
¶const clang::Expr* IgnoreImpCasts() const
const clang::Expr* IgnoreImpCasts() const
Declared at: clang/include/clang/AST/Expr.h:826
¶clang::Expr* IgnoreImplicit()
clang::Expr* IgnoreImplicit()
Description
Skip past any implicit AST nodes which might surround this expression until reaching a fixed point. Skips: * What IgnoreImpCasts() skips * MaterializeTemporaryExpr * CXXBindTemporaryExpr
Declared at: clang/include/clang/AST/Expr.h:846
¶const clang::Expr* IgnoreImplicit() const
const clang::Expr* IgnoreImplicit() const
Declared at: clang/include/clang/AST/Expr.h:847
¶clang::Expr* IgnoreImplicitAsWritten()
clang::Expr* IgnoreImplicitAsWritten()
Description
Skip past any implicit AST nodes which might surround this expression until reaching a fixed point. Same as IgnoreImplicit, except that it also skips over implicit calls to constructors and conversion functions. FIXME: Should IgnoreImplicit do this?
Declared at: clang/include/clang/AST/Expr.h:856
¶const clang::Expr* IgnoreImplicitAsWritten() const
const clang::Expr* IgnoreImplicitAsWritten() const
Declared at: clang/include/clang/AST/Expr.h:857
¶clang::Expr* IgnoreParenBaseCasts()
clang::Expr* IgnoreParenBaseCasts()
Description
Skip past any parentheses and derived-to-base casts until reaching a fixed point. Skips: * What IgnoreParens() skips * CastExpr which represent a derived-to-base cast (CK_DerivedToBase, CK_UncheckedDerivedToBase and CK_NoOp)
Declared at: clang/include/clang/AST/Expr.h:932
¶const clang::Expr* IgnoreParenBaseCasts() const
const clang::Expr* IgnoreParenBaseCasts() const
Declared at: clang/include/clang/AST/Expr.h:933
¶const clang::Expr* IgnoreParenCasts() const
const clang::Expr* IgnoreParenCasts() const
Declared at: clang/include/clang/AST/Expr.h:892
¶clang::Expr* IgnoreParenCasts()
clang::Expr* IgnoreParenCasts()
Description
Skip past any parentheses and casts which might surround this expression until reaching a fixed point. Skips: * What IgnoreParens() skips * What IgnoreCasts() skips
Declared at: clang/include/clang/AST/Expr.h:891
¶const clang::Expr* IgnoreParenImpCasts() const
const clang::Expr* IgnoreParenImpCasts() const
Declared at: clang/include/clang/AST/Expr.h:883
¶clang::Expr* IgnoreParenImpCasts()
clang::Expr* IgnoreParenImpCasts()
Description
Skip past any parentheses and implicit casts which might surround this expression until reaching a fixed point. FIXME: IgnoreParenImpCasts really ought to be equivalent to IgnoreParens() + IgnoreImpCasts() until reaching a fixed point. However this is currently not the case. Instead IgnoreParenImpCasts() skips: * What IgnoreParens() skips * What IgnoreImpCasts() skips * MaterializeTemporaryExpr * SubstNonTypeTemplateParmExpr
Declared at: clang/include/clang/AST/Expr.h:882
¶const clang::Expr* IgnoreParenLValueCasts() const
const clang::Expr* IgnoreParenLValueCasts() const
Declared at: clang/include/clang/AST/Expr.h:912
¶clang::Expr* IgnoreParenLValueCasts()
clang::Expr* IgnoreParenLValueCasts()
Description
Skip past any parentheses and lvalue casts which might surround this expression until reaching a fixed point. Skips: * What IgnoreParens() skips * What IgnoreCasts() skips, except that only lvalue-to-rvalue casts are skipped FIXME: This is intended purely as a temporary workaround for code that hasn't yet been rewritten to do the right thing about those casts, and may disappear along with the last internal use.
Declared at: clang/include/clang/AST/Expr.h:911
¶const clang::Expr* IgnoreParenNoopCasts(
const clang::ASTContext& Ctx) const
const clang::Expr* IgnoreParenNoopCasts(
const clang::ASTContext& Ctx) const
Declared at: clang/include/clang/AST/Expr.h:923
Parameters
- const clang::ASTContext& Ctx
¶clang::Expr* IgnoreParenNoopCasts(
const clang::ASTContext& Ctx)
clang::Expr* IgnoreParenNoopCasts(
const clang::ASTContext& Ctx)
Description
Skip past any parenthese and casts which do not change the value (including ptr->int casts of the same size) until reaching a fixed point. Skips: * What IgnoreParens() skips * CastExpr which do not change the value * SubstNonTypeTemplateParmExpr
Declared at: clang/include/clang/AST/Expr.h:922
Parameters
- const clang::ASTContext& Ctx
¶const clang::Expr* IgnoreParens() const
const clang::Expr* IgnoreParens() const
Declared at: clang/include/clang/AST/Expr.h:869
¶clang::Expr* IgnoreParens()
clang::Expr* IgnoreParens()
Description
Skip past any parentheses which might surround this expression until reaching a fixed point. Skips: * ParenExpr * UnaryOperator if `UO_Extension` * GenericSelectionExpr if `!isResultDependent()` * ChooseExpr if `!isConditionDependent()` * ConstantExpr
Declared at: clang/include/clang/AST/Expr.h:868
¶clang::Expr* IgnoreUnlessSpelledInSource()
clang::Expr* IgnoreUnlessSpelledInSource()
Description
Skip past any invisble AST nodes which might surround this statement, such as ExprWithCleanups or ImplicitCastExpr nodes, but also injected CXXMemberExpr and CXXConstructExpr which represent implicit conversions.
Declared at: clang/include/clang/AST/Expr.h:816
¶const clang::Expr* IgnoreUnlessSpelledInSource()
const
const clang::Expr* IgnoreUnlessSpelledInSource()
const
Declared at: clang/include/clang/AST/Expr.h:817
¶static bool classof(const clang::Stmt* T)
static bool classof(const clang::Stmt* T)
Declared at: clang/include/clang/AST/Expr.h:986
Parameters
- const clang::Stmt* T
¶bool containsErrors() const
bool containsErrors() const
Description
Whether this expression contains subexpressions which had errors, e.g. a TypoExpr.
Declared at: clang/include/clang/AST/Expr.h:238
¶bool containsUnexpandedParameterPack() const
bool containsUnexpandedParameterPack() const
Description
Whether this expression contains an unexpanded parameter pack (for C++11 variadic templates). Given the following function template: The expressions \c args and \c static_cast<Types&&>(args) both contain parameter packs.
Declared at: clang/include/clang/AST/Expr.h:232
¶static clang::QualType findBoundMemberType(
const clang::Expr* expr)
static clang::QualType findBoundMemberType(
const clang::Expr* expr)
Description
Given an expression of bound-member type, find the type of the member. Returns null if this is an *overloaded* bound member expression.
Declared at: clang/include/clang/AST/Expr.h:810
Parameters
- const clang::Expr* expr
¶const clang::ValueDecl*
getAsBuiltinConstantDeclRef(
const clang::ASTContext& Context) const
const clang::ValueDecl*
getAsBuiltinConstantDeclRef(
const clang::ASTContext& Context) const
Description
If this expression is an unambiguous reference to a single declaration, in the style of __builtin_function_start, return that declaration. Note that this may return a non-static member function or field in C++ if this expression is a member pointer constant.
Declared at: clang/include/clang/AST/Expr.h:579
Parameters
- const clang::ASTContext& Context
¶const clang::CXXRecordDecl*
getBestDynamicClassType() const
const clang::CXXRecordDecl*
getBestDynamicClassType() const
Description
For an expression of class type or pointer to class type, return the most derived class decl the expression is known to refer to. If this expression is a cast, this method looks through it to find the most derived decl that can be inferred from the expression. This is valid because derived-to-base conversions have undefined behavior if the object isn't dynamically of the derived type.
Declared at: clang/include/clang/AST/Expr.h:962
¶const clang::Expr* getBestDynamicClassTypeExpr()
const
const clang::Expr* getBestDynamicClassTypeExpr()
const
Description
Get the inner expression that determines the best dynamic class. If this is a prvalue, we guarantee that it is of the most-derived type for the object itself.
Declared at: clang/include/clang/AST/Expr.h:967
¶clang::ExprDependence getDependence() const
clang::ExprDependence getDependence() const
Declared at: clang/include/clang/AST/Expr.h:155
¶clang::SourceLocation getExprLoc() const
clang::SourceLocation getExprLoc() const
Description
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic expression.
Declared at: clang/include/clang/AST/Expr.h:244
¶clang::FPOptions getFPFeaturesInEffect(
const clang::LangOptions& LO) const
clang::FPOptions getFPFeaturesInEffect(
const clang::LangOptions& LO) const
Description
Returns the set of floating point options that apply to this expression. Only meaningful for operations on floating point values.
Declared at: clang/include/clang/AST/Expr.h:416
Parameters
- const clang::LangOptions& LO
¶Optional<llvm::APSInt> getIntegerConstantExpr(
const clang::ASTContext& Ctx,
clang::SourceLocation* Loc = nullptr,
bool isEvaluated = true) const
Optional<llvm::APSInt> getIntegerConstantExpr(
const clang::ASTContext& Ctx,
clang::SourceLocation* Loc = nullptr,
bool isEvaluated = true) const
Description
isIntegerConstantExpr - Return the value if this expression is a valid integer constant expression. If not a valid i-c-e, return None and fill in Loc (if specified) with the location of the invalid expression. Note: This does not perform the implicit conversions required by C++11 [expr.const]p5.
Declared at: clang/include/clang/AST/Expr.h:532
Parameters
- const clang::ASTContext& Ctx
- clang::SourceLocation* Loc = nullptr
- bool isEvaluated = true
¶const clang::ObjCPropertyRefExpr*
getObjCProperty() const
const clang::ObjCPropertyRefExpr*
getObjCProperty() const
Description
If this expression is an l-value for an Objective C property, find the underlying property reference expression.
Declared at: clang/include/clang/AST/Expr.h:484
¶clang::ExprObjectKind getObjectKind() const
clang::ExprObjectKind getObjectKind() const
Description
getObjectKind - The object kind that this expression produces. Object kinds are meaningful only for expressions that yield an l-value or x-value.
Declared at: clang/include/clang/AST/Expr.h:437
¶clang::Decl* getReferencedDeclOfCallee()
clang::Decl* getReferencedDeclOfCallee()
Declared at: clang/include/clang/AST/Expr.h:477
¶const clang::Decl* getReferencedDeclOfCallee()
const
const clang::Decl* getReferencedDeclOfCallee()
const
Declared at: clang/include/clang/AST/Expr.h:478
¶const clang::FieldDecl* getSourceBitField() const
const clang::FieldDecl* getSourceBitField() const
Declared at: clang/include/clang/AST/Expr.h:473
¶clang::FieldDecl* getSourceBitField()
clang::FieldDecl* getSourceBitField()
Description
If this expression refers to a bit-field, retrieve the declaration of that bit-field. Note that this returns a non-null pointer in subtly different places than refersToBitField returns true. In particular, this can return a non-null pointer even for r-values loaded from bit-fields, but it will return null for a conditional bit-field.
Declared at: clang/include/clang/AST/Expr.h:471
¶clang::QualType getType() const
clang::QualType getType() const
Declared at: clang/include/clang/AST/Expr.h:141
¶clang::ExprValueKind getValueKind() const
clang::ExprValueKind getValueKind() const
Description
getValueKind - The value kind that this expression produces.
Declared at: clang/include/clang/AST/Expr.h:430
¶static clang::ExprValueKind getValueKindForType(
clang::QualType T)
static clang::ExprValueKind getValueKindForType(
clang::QualType T)
Description
getValueKindForType - Given a formal return or parameter type, give its value kind.
Declared at: clang/include/clang/AST/Expr.h:420
Parameters
¶static bool hasAnyTypeDependentArguments(
ArrayRef<clang::Expr*> Exprs)
static bool hasAnyTypeDependentArguments(
ArrayRef<clang::Expr*> Exprs)
Declared at: clang/include/clang/AST/Expr.h:953
Parameters
- ArrayRef<clang::Expr*> Exprs
¶bool hasNonTrivialCall(
const clang::ASTContext& Ctx) const
bool hasNonTrivialCall(
const clang::ASTContext& Ctx) const
Description
Determine whether this expression involves a call to any function that is not trivial.
Declared at: clang/include/clang/AST/Expr.h:680
Parameters
- const clang::ASTContext& Ctx
¶bool hasPlaceholderType() const
bool hasPlaceholderType() const
Description
Returns whether this expression has a placeholder type.
Declared at: clang/include/clang/AST/Expr.h:502
¶bool hasPlaceholderType(BuiltinType::Kind K) const
bool hasPlaceholderType(BuiltinType::Kind K) const
Description
Returns whether this expression has a specific placeholder type.
Declared at: clang/include/clang/AST/Expr.h:507
Parameters
- BuiltinType::Kind K
¶bool isBoundMemberFunction(
clang::ASTContext& Ctx) const
bool isBoundMemberFunction(
clang::ASTContext& Ctx) const
Description
Returns true if this expression is a bound member function.
Declared at: clang/include/clang/AST/Expr.h:805
Parameters
- clang::ASTContext& Ctx
¶bool isCXX11ConstantExpr(
const clang::ASTContext& Ctx,
clang::APValue* Result = nullptr,
clang::SourceLocation* Loc = nullptr) const
bool isCXX11ConstantExpr(
const clang::ASTContext& Ctx,
clang::APValue* Result = nullptr,
clang::SourceLocation* Loc = nullptr) const
Description
isCXX11ConstantExpr - Return true if this expression is a constant expression in C++11. Can only be used in C++. Note: This does not perform the implicit conversions required by C++11 [expr.const]p5.
Declared at: clang/include/clang/AST/Expr.h:547
Parameters
- const clang::ASTContext& Ctx
- clang::APValue* Result = nullptr
- clang::SourceLocation* Loc = nullptr
¶bool isCXX98IntegralConstantExpr(
const clang::ASTContext& Ctx) const
bool isCXX98IntegralConstantExpr(
const clang::ASTContext& Ctx) const
Description
isCXX98IntegralConstantExpr - Return true if this expression is an integral constant expression in C++98. Can only be used in C++.
Declared at: clang/include/clang/AST/Expr.h:540
Parameters
- const clang::ASTContext& Ctx
¶bool isConstantInitializer(
clang::ASTContext& Ctx,
bool ForRef,
const clang::Expr** Culprit = nullptr) const
bool isConstantInitializer(
clang::ASTContext& Ctx,
bool ForRef,
const clang::Expr** Culprit = nullptr) const
Description
isConstantInitializer - Returns true if this expression can be emitted to IR as a constant, and thus can be used as a constant initializer in C. If this expression is not constant and Culprit is non-null, it is used to store the address of first non constant expr.
Declared at: clang/include/clang/AST/Expr.h:572
Parameters
- clang::ASTContext& Ctx
- bool ForRef
- const clang::Expr** Culprit = nullptr
¶bool isDefaultArgument() const
bool isDefaultArgument() const
Description
Determine whether this expression is a default function argument. Default arguments are implicitly generated in the abstract syntax tree by semantic analysis for function calls, object constructions, etc. in C++. Default arguments are represented by \c CXXDefaultArgExpr nodes; this routine also looks through any implicit casts to determine whether the expression is a default argument.
Declared at: clang/include/clang/AST/Expr.h:944
¶bool isEvaluatable(const clang::ASTContext& Ctx,
clang::Expr::SideEffectsKind
AllowSideEffects =
SE_NoSideEffects) const
bool isEvaluatable(const clang::ASTContext& Ctx,
clang::Expr::SideEffectsKind
AllowSideEffects =
SE_NoSideEffects) const
Description
isEvaluatable - Call EvaluateAsRValue to see if this expression can be constant folded without side-effects, but discard the result.
Declared at: clang/include/clang/AST/Expr.h:665
Parameters
- const clang::ASTContext& Ctx
- clang::Expr::SideEffectsKind AllowSideEffects = SE_NoSideEffects
¶bool isGLValue() const
bool isGLValue() const
Declared at: clang/include/clang/AST/Expr.h:273
¶bool isImplicitCXXThis() const
bool isImplicitCXXThis() const
Description
Whether this expression is an implicit reference to 'this' in C++.
Declared at: clang/include/clang/AST/Expr.h:951
¶bool isInstantiationDependent() const
bool isInstantiationDependent() const
Description
Whether this expression is instantiation-dependent, meaning that it depends in some way on - a template parameter (even if neither its type nor (constant) value can change due to the template instantiation) - or an error In the following example, the expression \c sizeof(sizeof(T() + T())) is instantiation-dependent (since it involves a template parameter \c T), but is neither type- nor value-dependent, since the type of the inner\c sizeof is known (\c std::size_t) and therefore the size of the outer\c sizeof is known.
Declared at: clang/include/clang/AST/Expr.h:214
¶bool isIntegerConstantExpr(
const clang::ASTContext& Ctx,
clang::SourceLocation* Loc = nullptr) const
bool isIntegerConstantExpr(
const clang::ASTContext& Ctx,
clang::SourceLocation* Loc = nullptr) const
Declared at: clang/include/clang/AST/Expr.h:535
Parameters
- const clang::ASTContext& Ctx
- clang::SourceLocation* Loc = nullptr
¶bool isKnownToHaveBooleanValue(
bool Semantic = true) const
bool isKnownToHaveBooleanValue(
bool Semantic = true) const
Description
isKnownToHaveBooleanValue - Return true if this is an integer expression that is known to return 0 or 1. This happens for _Bool/bool expressions but also int expressions which are produced by things like comparisons in C.
Declared at: clang/include/clang/AST/Expr.h:524
Parameters
- bool Semantic = true
- If true, only return true for expressions that are known to be semantically boolean, which might not be true even for expressions that are known to evaluate to 0/1. For instance, reading an unsigned bit-field with width '1' will evaluate to 0/1, but doesn't necessarily semantically correspond to a bool.
¶bool isLValue() const
bool isLValue() const
Description
isLValue - True if this expression is an "l-value" according to the rules of the current language. C and C++ give somewhat different rules for this concept, but in general, the result of an l-value expression identifies a specific object whereas the result of an r-value expression is a value detached from any specific storage. C++11 divides the concept of "r-value" into pure r-values ("pr-values") and so-called expiring values ("x-values"), which identify specific objects that can be safely cannibalized for their resources.
Declared at: clang/include/clang/AST/Expr.h:270
¶clang::Expr::isModifiableLvalueResult
isModifiableLvalue(
clang::ASTContext& Ctx,
clang::SourceLocation* Loc = nullptr) const
clang::Expr::isModifiableLvalueResult
isModifiableLvalue(
clang::ASTContext& Ctx,
clang::SourceLocation* Loc = nullptr) const
Description
isModifiableLvalue - C99 6.3.2.1: an lvalue that does not have array type, does not have an incomplete type, does not have a const-qualified type, and if it is a structure or union, does not have any member (including, recursively, any member or element of all contained aggregates or unions) with a const-qualified type.
Declared at: clang/include/clang/AST/Expr.h:319
Parameters
- clang::ASTContext& Ctx
- clang::SourceLocation* Loc = nullptr
- [in,out] - A source location which *may* be filled in with the location of the expression making this a non-modifiable lvalue, if specified.
¶clang::Expr::NullPointerConstantKind
isNullPointerConstant(
clang::ASTContext& Ctx,
clang::Expr::
NullPointerConstantValueDependence NPC)
const
clang::Expr::NullPointerConstantKind
isNullPointerConstant(
clang::ASTContext& Ctx,
clang::Expr::
NullPointerConstantValueDependence NPC)
const
Description
isNullPointerConstant - C99 6.3.2.3p3 - Test if this reduces down to a Null pointer constant. The return value can further distinguish the kind of NULL pointer constant that was detected.
Declared at: clang/include/clang/AST/Expr.h:796
Parameters
- clang::ASTContext& Ctx
- clang::Expr::NullPointerConstantValueDependence NPC
¶bool isOBJCGCCandidate(
clang::ASTContext& Ctx) const
bool isOBJCGCCandidate(
clang::ASTContext& Ctx) const
Description
isOBJCGCCandidate - Return true if this expression may be used in a read/ write barrier.
Declared at: clang/include/clang/AST/Expr.h:802
Parameters
- clang::ASTContext& Ctx
¶bool isObjCSelfExpr() const
bool isObjCSelfExpr() const
Description
Check if this expression is the ObjC 'self' implicit parameter.
Declared at: clang/include/clang/AST/Expr.h:487
¶bool isOrdinaryOrBitFieldObject() const
bool isOrdinaryOrBitFieldObject() const
Declared at: clang/include/clang/AST/Expr.h:441
¶bool isPRValue() const
bool isPRValue() const
Declared at: clang/include/clang/AST/Expr.h:271
¶static bool isPotentialConstantExpr(
const clang::FunctionDecl* FD,
SmallVectorImpl<clang::PartialDiagnosticAt>&
Diags)
static bool isPotentialConstantExpr(
const clang::FunctionDecl* FD,
SmallVectorImpl<clang::PartialDiagnosticAt>&
Diags)
Description
isPotentialConstantExpr - Return true if this function's definition might be usable in a constant expression in C++11, if it were marked constexpr. Return false if the function can never produce a constant expression, along with diagnostics describing why not.
Declared at: clang/include/clang/AST/Expr.h:554
Parameters
- const clang::FunctionDecl* FD
- SmallVectorImpl<clang::PartialDiagnosticAt>& Diags
¶static bool isPotentialConstantExprUnevaluated(
clang::Expr* E,
const clang::FunctionDecl* FD,
SmallVectorImpl<clang::PartialDiagnosticAt>&
Diags)
static bool isPotentialConstantExprUnevaluated(
clang::Expr* E,
const clang::FunctionDecl* FD,
SmallVectorImpl<clang::PartialDiagnosticAt>&
Diags)
Description
isPotentialConstantExprUnevaluted - Return true if this expression might be usable in a constant expression in C++11 in an unevaluated context, if it were in function FD marked constexpr. Return false if the function can never produce a constant expression, along with diagnostics describing why not.
Declared at: clang/include/clang/AST/Expr.h:563
Parameters
- clang::Expr* E
- const clang::FunctionDecl* FD
- SmallVectorImpl<clang::PartialDiagnosticAt>& Diags
¶bool isReadIfDiscardedInCPlusPlus11() const
bool isReadIfDiscardedInCPlusPlus11() const
Description
Determine whether an lvalue-to-rvalue conversion should implicitly be applied to this expression if it appears as a discarded-value expression in C++11 onwards. This applies to certain forms of volatile glvalues.
Declared at: clang/include/clang/AST/Expr.h:249
¶static bool isSameComparisonOperand(
const clang::Expr* E1,
const clang::Expr* E2)
static bool isSameComparisonOperand(
const clang::Expr* E1,
const clang::Expr* E2)
Description
Checks that the two Expr's will refer to the same value as a comparison operand. The caller must ensure that the values referenced by the Expr's are not modified between E1 and E2 or the result my be invalid.
Declared at: clang/include/clang/AST/Expr.h:984
Parameters
- const clang::Expr* E1
- const clang::Expr* E2
¶bool isTemporaryObject(
clang::ASTContext& Ctx,
const clang::CXXRecordDecl* TempTy) const
bool isTemporaryObject(
clang::ASTContext& Ctx,
const clang::CXXRecordDecl* TempTy) const
Description
Determine whether the result of this expression is a temporary object of the given class type.
Declared at: clang/include/clang/AST/Expr.h:948
Parameters
- clang::ASTContext& Ctx
- const clang::CXXRecordDecl* TempTy
¶bool isTypeDependent() const
bool isTypeDependent() const
Description
Determines whether the type of this expression depends on - a template paramter (C++ [temp.dep.expr], which means that its type could change from one template instantiation to the next) - or an error For example, the expressions "x" and "x + y" are type-dependent in the following code, but "y" is not type-dependent:
Declared at: clang/include/clang/AST/Expr.h:185
¶bool isUnusedResultAWarning(
const clang::Expr*& WarnExpr,
clang::SourceLocation& Loc,
clang::SourceRange& R1,
clang::SourceRange& R2,
clang::ASTContext& Ctx) const
bool isUnusedResultAWarning(
const clang::Expr*& WarnExpr,
clang::SourceLocation& Loc,
clang::SourceRange& R1,
clang::SourceRange& R2,
clang::ASTContext& Ctx) const
Description
isUnusedResultAWarning - Return true if this immediate expression should be warned about if the result is unused. If so, fill in expr, location, and ranges with expr to warn on and source locations/ranges appropriate for a warning.
Declared at: clang/include/clang/AST/Expr.h:255
Parameters
- const clang::Expr*& WarnExpr
- clang::SourceLocation& Loc
- clang::SourceRange& R1
- clang::SourceRange& R2
- clang::ASTContext& Ctx
¶bool isValueDependent() const
bool isValueDependent() const
Description
Determines whether the value of this expression depends on - a template parameter (C++ [temp.dep.constexpr]) - or an error, whose resolution is unknown For example, the array bound of "Chars" in the following example is value-dependent.
Declared at: clang/include/clang/AST/Expr.h:168
¶bool isXValue() const
bool isXValue() const
Declared at: clang/include/clang/AST/Expr.h:272
¶bool refersToBitField() const
bool refersToBitField() const
Description
Returns true if this expression is a gl-value that potentially refers to a bit-field. In C++, whether a gl-value refers to a bitfield is essentially an aspect of the value-kind type system.
Declared at: clang/include/clang/AST/Expr.h:462
¶bool refersToGlobalRegisterVar() const
bool refersToGlobalRegisterVar() const
Description
Returns whether this expression refers to a global register variable.
Declared at: clang/include/clang/AST/Expr.h:499
¶bool refersToMatrixElement() const
bool refersToMatrixElement() const
Description
Returns whether this expression refers to a matrix element.
Declared at: clang/include/clang/AST/Expr.h:493
¶bool refersToVectorElement() const
bool refersToVectorElement() const
Description
Returns whether this expression refers to a vector element.
Declared at: clang/include/clang/AST/Expr.h:490
¶void setDependence(clang::ExprDependence Deps)
void setDependence(clang::ExprDependence Deps)
Description
Each concrete expr subclass is expected to compute its dependence and call this in the constructor.
Declared at: clang/include/clang/AST/Expr.h:134
Parameters
- clang::ExprDependence Deps
¶void setObjectKind(clang::ExprObjectKind Cat)
void setObjectKind(clang::ExprObjectKind Cat)
Description
setObjectKind - Set the object kind produced by this expression.
Declared at: clang/include/clang/AST/Expr.h:450
Parameters
- clang::ExprObjectKind Cat
¶void setType(clang::QualType t)
void setType(clang::QualType t)
Declared at: clang/include/clang/AST/Expr.h:142
Parameters
¶void setValueKind(clang::ExprValueKind Cat)
void setValueKind(clang::ExprValueKind Cat)
Description
setValueKind - Set the value kind produced by this expression.
Declared at: clang/include/clang/AST/Expr.h:447
Parameters
- clang::ExprValueKind Cat
¶const clang::Expr* skipRValueSubobjectAdjustments(
SmallVectorImpl<const clang::Expr*>& CommaLHS,
SmallVectorImpl<clang::SubobjectAdjustment>&
Adjustments) const
const clang::Expr* skipRValueSubobjectAdjustments(
SmallVectorImpl<const clang::Expr*>& CommaLHS,
SmallVectorImpl<clang::SubobjectAdjustment>&
Adjustments) const
Description
Walk outwards from an expression we want to bind a reference to and find the expression whose lifetime needs to be extended. Record the LHSs of comma expressions and adjustments needed along the path.
Declared at: clang/include/clang/AST/Expr.h:972
Parameters
- SmallVectorImpl<const clang::Expr*>& CommaLHS
- SmallVectorImpl<clang::SubobjectAdjustment>& Adjustments
¶const clang::Expr*
skipRValueSubobjectAdjustments() const
const clang::Expr*
skipRValueSubobjectAdjustments() const
Declared at: clang/include/clang/AST/Expr.h:975
¶bool tryEvaluateObjectSize(
uint64_t& Result,
clang::ASTContext& Ctx,
unsigned int Type) const
bool tryEvaluateObjectSize(
uint64_t& Result,
clang::ASTContext& Ctx,
unsigned int Type) const
Description
If the current Expr is a pointer, this will try to statically determine the number of bytes available where the pointer is pointing. Returns true if all of the above holds and we were able to figure out the size, false otherwise.
Declared at: clang/include/clang/AST/Expr.h:746
Parameters
- uint64_t& Result
- clang::ASTContext& Ctx
- unsigned int Type
- - How to evaluate the size of the Expr, as defined by the "type" parameter of __builtin_object_size
¶bool tryEvaluateStrLen(
uint64_t& Result,
clang::ASTContext& Ctx) const
bool tryEvaluateStrLen(
uint64_t& Result,
clang::ASTContext& Ctx) const
Description
If the current Expr is a pointer, this will try to statically determine the strlen of the string pointed to. Returns true if all of the above holds and we were able to figure out the strlen, false otherwise.
Declared at: clang/include/clang/AST/Expr.h:753
Parameters
- uint64_t& Result
- clang::ASTContext& Ctx