class CompoundAssignOperator

Declaration

class CompoundAssignOperator : public BinaryOperator { /* full declaration omitted */ };

Description

CompoundAssignOperator - For compound assignments (e.g. +=), we keep track of the type the operation is performed in. Due to the semantics of these operators, the operands are promoted, the arithmetic performed, an implicit conversion back to the result type done, then the assignment takes place. This captures the intermediate type which the computation is done in.

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

Inherits from: BinaryOperator

Member Variables

private clang::QualType ComputationLHSType
private clang::QualType ComputationResultType

Inherited from Stmt:

protected

Method Overview

  • private CompoundAssignOperator(const clang::ASTContext & C, clang::Stmt::EmptyShell Empty, bool hasFPFeatures)
  • protected CompoundAssignOperator(const clang::ASTContext & C, clang::Expr * lhs, clang::Expr * rhs, clang::BinaryOperator::Opcode opc, clang::QualType ResType, clang::ExprValueKind VK, clang::ExprObjectKind OK, clang::SourceLocation OpLoc, clang::FPOptionsOverride FPFeatures, clang::QualType CompLHSType, clang::QualType CompResultType)
  • public static clang::CompoundAssignOperator * Create(const clang::ASTContext & C, clang::Expr * lhs, clang::Expr * rhs, clang::BinaryOperator::Opcode opc, clang::QualType ResTy, clang::ExprValueKind VK, clang::ExprObjectKind OK, clang::SourceLocation opLoc, clang::FPOptionsOverride FPFeatures, clang::QualType CompLHSType = clang::QualType(), clang::QualType CompResultType = clang::QualType())
  • public static clang::CompoundAssignOperator * CreateEmpty(const clang::ASTContext & C, bool hasFPFeatures)
  • public static bool classof(const clang::Stmt * S)
  • public clang::QualType getComputationLHSType() const
  • public clang::QualType getComputationResultType() const
  • public void setComputationLHSType(clang::QualType T)
  • public void setComputationResultType(clang::QualType T)

Inherited from BinaryOperator:

Inherited from Expr:

Inherited from ValueStmt:

Inherited from Stmt:

Methods

CompoundAssignOperator(
    const clang::ASTContext& C,
    clang::Stmt::EmptyShell Empty,
    bool hasFPFeatures)

Description

Construct an empty CompoundAssignOperator.

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

Parameters

const clang::ASTContext& C
clang::Stmt::EmptyShell Empty
bool hasFPFeatures

CompoundAssignOperator(
    const clang::ASTContext& C,
    clang::Expr* lhs,
    clang::Expr* rhs,
    clang::BinaryOperator::Opcode opc,
    clang::QualType ResType,
    clang::ExprValueKind VK,
    clang::ExprObjectKind OK,
    clang::SourceLocation OpLoc,
    clang::FPOptionsOverride FPFeatures,
    clang::QualType CompLHSType,
    clang::QualType CompResultType)

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

Parameters

const clang::ASTContext& C
clang::Expr* lhs
clang::Expr* rhs
clang::BinaryOperator::Opcode opc
clang::QualType ResType
clang::ExprValueKind VK
clang::ExprObjectKind OK
clang::SourceLocation OpLoc
clang::FPOptionsOverride FPFeatures
clang::QualType CompLHSType
clang::QualType CompResultType

static clang::CompoundAssignOperator* Create(
    const clang::ASTContext& C,
    clang::Expr* lhs,
    clang::Expr* rhs,
    clang::BinaryOperator::Opcode opc,
    clang::QualType ResTy,
    clang::ExprValueKind VK,
    clang::ExprObjectKind OK,
    clang::SourceLocation opLoc,
    clang::FPOptionsOverride FPFeatures,
    clang::QualType CompLHSType =
        clang::QualType(),
    clang::QualType CompResultType =
        clang::QualType())

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

Parameters

const clang::ASTContext& C
clang::Expr* lhs
clang::Expr* rhs
clang::BinaryOperator::Opcode opc
clang::QualType ResTy
clang::ExprValueKind VK
clang::ExprObjectKind OK
clang::SourceLocation opLoc
clang::FPOptionsOverride FPFeatures
clang::QualType CompLHSType = clang::QualType()
clang::QualType CompResultType = clang::QualType()

static clang::CompoundAssignOperator* CreateEmpty(
    const clang::ASTContext& C,
    bool hasFPFeatures)

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

Parameters

const clang::ASTContext& C
bool hasFPFeatures

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

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

Parameters

const clang::Stmt* S

clang::QualType getComputationLHSType() const

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

clang::QualType getComputationResultType() const

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

void setComputationLHSType(clang::QualType T)

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

Parameters

clang::QualType T

void setComputationResultType(clang::QualType T)

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

Parameters

clang::QualType T