class CXXRewrittenBinaryOperator
Declaration
class CXXRewrittenBinaryOperator : public Expr { /* full declaration omitted */ };
Description
A rewritten comparison expression that was originally written using operator syntax. In C++20, the following rewrites are performed: - a == b -> b == a - a != b -> !(a == b) - a != b -> !(b == a) - For \c \ in \c <, \c <=, \c >, \c >=, \c <=>: - a @ b -> (a < => b) @ 0 - a @ b -> 0 @ (b < => a) This expression provides access to both the original syntax and the rewritten expression. Note that the rewritten calls to \c ==, \c <=>, and \c \ are typically\c CXXOperatorCallExprs, but could theoretically be \c BinaryOperators.
Declared at: clang/include/clang/AST/ExprCXX.h:284
Inherits from: Expr
Member Variables
- private clang::Stmt* SemanticForm
- The rewritten semantic form.
Inherited from Stmt:
Method Overview
- public CXXRewrittenBinaryOperator(clang::Stmt::EmptyShell Empty)
- public CXXRewrittenBinaryOperator(clang::Expr * SemanticForm, bool IsReversed)
- public clang::Stmt::child_range children()
- public static bool classof(const clang::Stmt * T)
- public clang::SourceLocation getBeginLoc() const
- public clang::CXXRewrittenBinaryOperator::DecomposedForm getDecomposedForm() const
- public clang::SourceLocation getEndLoc() const
- public clang::SourceLocation getExprLoc() const
- public const clang::Expr * getLHS() const
- public clang::BinaryOperatorKind getOpcode() const
- public static llvm::StringRef getOpcodeStr(clang::BinaryOperatorKind Op)
- public llvm::StringRef getOpcodeStr() const
- public clang::BinaryOperatorKind getOperator() const
- public clang::SourceLocation getOperatorLoc() const
- public const clang::Expr * getRHS() const
- public clang::Expr * getSemanticForm()
- public const clang::Expr * getSemanticForm() const
- public clang::SourceRange getSourceRange() const
- public bool isAssignmentOp() const
- public bool isComparisonOp() const
- public bool isReversed() const
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
¶CXXRewrittenBinaryOperator(
clang::Stmt::EmptyShell Empty)
CXXRewrittenBinaryOperator(
clang::Stmt::EmptyShell Empty)
Declared at: clang/include/clang/AST/ExprCXX.h:298
Parameters
- clang::Stmt::EmptyShell Empty
¶CXXRewrittenBinaryOperator(
clang::Expr* SemanticForm,
bool IsReversed)
CXXRewrittenBinaryOperator(
clang::Expr* SemanticForm,
bool IsReversed)
Declared at: clang/include/clang/AST/ExprCXX.h:291
Parameters
- clang::Expr* SemanticForm
- bool IsReversed
¶clang::Stmt::child_range children()
clang::Stmt::child_range children()
Declared at: clang/include/clang/AST/ExprCXX.h:357
¶static bool classof(const clang::Stmt* T)
static bool classof(const clang::Stmt* T)
Declared at: clang/include/clang/AST/ExprCXX.h:361
Parameters
- const clang::Stmt* T
¶clang::SourceLocation getBeginLoc() const
clang::SourceLocation getBeginLoc() const
Declared at: clang/include/clang/AST/ExprCXX.h:345
¶clang::CXXRewrittenBinaryOperator::DecomposedForm
getDecomposedForm() const
clang::CXXRewrittenBinaryOperator::DecomposedForm
getDecomposedForm() const
Description
Decompose this operator into its syntactic form.
Declared at: clang/include/clang/AST/ExprCXX.h:317
¶clang::SourceLocation getEndLoc() const
clang::SourceLocation getEndLoc() const
Declared at: clang/include/clang/AST/ExprCXX.h:348
¶clang::SourceLocation getExprLoc() const
clang::SourceLocation getExprLoc() const
Declared at: clang/include/clang/AST/ExprCXX.h:339
¶const clang::Expr* getLHS() const
const clang::Expr* getLHS() const
Declared at: clang/include/clang/AST/ExprCXX.h:333
¶clang::BinaryOperatorKind getOpcode() const
clang::BinaryOperatorKind getOpcode() const
Declared at: clang/include/clang/AST/ExprCXX.h:323
¶static llvm::StringRef getOpcodeStr(
clang::BinaryOperatorKind Op)
static llvm::StringRef getOpcodeStr(
clang::BinaryOperatorKind Op)
Declared at: clang/include/clang/AST/ExprCXX.h:324
Parameters
- clang::BinaryOperatorKind Op
¶llvm::StringRef getOpcodeStr() const
llvm::StringRef getOpcodeStr() const
Declared at: clang/include/clang/AST/ExprCXX.h:327
¶clang::BinaryOperatorKind getOperator() const
clang::BinaryOperatorKind getOperator() const
Declared at: clang/include/clang/AST/ExprCXX.h:322
¶clang::SourceLocation getOperatorLoc() const
clang::SourceLocation getOperatorLoc() const
Declared at: clang/include/clang/AST/ExprCXX.h:336
¶const clang::Expr* getRHS() const
const clang::Expr* getRHS() const
Declared at: clang/include/clang/AST/ExprCXX.h:334
¶clang::Expr* getSemanticForm()
clang::Expr* getSemanticForm()
Description
Get an equivalent semantic form for this expression.
Declared at: clang/include/clang/AST/ExprCXX.h:302
¶const clang::Expr* getSemanticForm() const
const clang::Expr* getSemanticForm() const
Declared at: clang/include/clang/AST/ExprCXX.h:303
¶clang::SourceRange getSourceRange() const
clang::SourceRange getSourceRange() const
Declared at: clang/include/clang/AST/ExprCXX.h:351
¶bool isAssignmentOp() const
bool isAssignmentOp() const
Declared at: clang/include/clang/AST/ExprCXX.h:331
¶bool isComparisonOp() const
bool isComparisonOp() const
Declared at: clang/include/clang/AST/ExprCXX.h:330
¶bool isReversed() const
bool isReversed() const
Description
Determine whether this expression was rewritten in reverse form.
Declared at: clang/include/clang/AST/ExprCXX.h:320