class CXXOperatorCallExpr

Declaration

class CXXOperatorCallExpr : public CallExpr { /* full declaration omitted */ };

Description

A call to an overloaded operator written using operator syntax. Represents a call to an overloaded operator written using operator syntax, e.g., "x + y" or "*p". While semantically equivalent to a normal call, this AST node provides better information about the syntactic representation of the call. In a C++ template, this expression node kind will be used whenever any of the arguments are type-dependent. In this case, the function itself will be a (possibly empty) set of functions and function templates that were found by name lookup at template definition time.

Declared at: clang/include/clang/AST/ExprCXX.h:82

Inherits from: CallExpr

Member Variables

private clang::SourceRange Range

Inherited from CallExpr:

public static NotADL = ADLCallKind::NotADL
public static UsesADL = ADLCallKind::UsesADL

Inherited from Stmt:

protected

Method Overview

  • private CXXOperatorCallExpr(clang::OverloadedOperatorKind OpKind, clang::Expr * Fn, ArrayRef<clang::Expr *> Args, clang::QualType Ty, clang::ExprValueKind VK, clang::SourceLocation OperatorLoc, clang::FPOptionsOverride FPFeatures, clang::CallExpr::ADLCallKind UsesADL)
  • private CXXOperatorCallExpr(unsigned int NumArgs, bool HasFPFeatures, clang::Stmt::EmptyShell Empty)
  • public static clang::CXXOperatorCallExpr * Create(const clang::ASTContext & Ctx, clang::OverloadedOperatorKind OpKind, clang::Expr * Fn, ArrayRef<clang::Expr *> Args, clang::QualType Ty, clang::ExprValueKind VK, clang::SourceLocation OperatorLoc, clang::FPOptionsOverride FPFeatures, clang::CallExpr::ADLCallKind UsesADL = NotADL)
  • public static clang::CXXOperatorCallExpr * CreateEmpty(const clang::ASTContext & Ctx, unsigned int NumArgs, bool HasFPFeatures, clang::Stmt::EmptyShell Empty)
  • public static bool classof(const clang::Stmt * T)
  • public clang::SourceLocation getBeginLoc() const
  • public clang::SourceLocation getEndLoc() const
  • public clang::SourceLocation getExprLoc() const
  • public clang::OverloadedOperatorKind getOperator() const
  • public clang::SourceLocation getOperatorLoc() const
  • public clang::SourceRange getSourceRange() const
  • private clang::SourceRange getSourceRangeImpl() const
  • public static bool isAssignmentOp(clang::OverloadedOperatorKind Opc)
  • public bool isAssignmentOp() const
  • public static bool isComparisonOp(clang::OverloadedOperatorKind Opc)
  • public bool isComparisonOp() const
  • public bool isInfixBinaryOp() const

Inherited from CallExpr:

Inherited from Expr:

Inherited from ValueStmt:

Inherited from Stmt:

Methods

CXXOperatorCallExpr(
    clang::OverloadedOperatorKind OpKind,
    clang::Expr* Fn,
    ArrayRef<clang::Expr*> Args,
    clang::QualType Ty,
    clang::ExprValueKind VK,
    clang::SourceLocation OperatorLoc,
    clang::FPOptionsOverride FPFeatures,
    clang::CallExpr::ADLCallKind UsesADL)

Declared at: clang/include/clang/AST/ExprCXX.h:93

Parameters

clang::OverloadedOperatorKind OpKind
clang::Expr* Fn
ArrayRef<clang::Expr*> Args
clang::QualType Ty
clang::ExprValueKind VK
clang::SourceLocation OperatorLoc
clang::FPOptionsOverride FPFeatures
clang::CallExpr::ADLCallKind UsesADL

CXXOperatorCallExpr(unsigned int NumArgs,
                    bool HasFPFeatures,
                    clang::Stmt::EmptyShell Empty)

Declared at: clang/include/clang/AST/ExprCXX.h:98

Parameters

unsigned int NumArgs
bool HasFPFeatures
clang::Stmt::EmptyShell Empty

static clang::CXXOperatorCallExpr* Create(
    const clang::ASTContext& Ctx,
    clang::OverloadedOperatorKind OpKind,
    clang::Expr* Fn,
    ArrayRef<clang::Expr*> Args,
    clang::QualType Ty,
    clang::ExprValueKind VK,
    clang::SourceLocation OperatorLoc,
    clang::FPOptionsOverride FPFeatures,
    clang::CallExpr::ADLCallKind UsesADL = NotADL)

Declared at: clang/include/clang/AST/ExprCXX.h:102

Parameters

const clang::ASTContext& Ctx
clang::OverloadedOperatorKind OpKind
clang::Expr* Fn
ArrayRef<clang::Expr*> Args
clang::QualType Ty
clang::ExprValueKind VK
clang::SourceLocation OperatorLoc
clang::FPOptionsOverride FPFeatures
clang::CallExpr::ADLCallKind UsesADL = NotADL

static clang::CXXOperatorCallExpr* CreateEmpty(
    const clang::ASTContext& Ctx,
    unsigned int NumArgs,
    bool HasFPFeatures,
    clang::Stmt::EmptyShell Empty)

Declared at: clang/include/clang/AST/ExprCXX.h:107

Parameters

const clang::ASTContext& Ctx
unsigned int NumArgs
bool HasFPFeatures
clang::Stmt::EmptyShell Empty

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

Declared at: clang/include/clang/AST/ExprCXX.h:164

Parameters

const clang::Stmt* T

clang::SourceLocation getBeginLoc() const

Declared at: clang/include/clang/AST/ExprCXX.h:160

clang::SourceLocation getEndLoc() const

Declared at: clang/include/clang/AST/ExprCXX.h:161

clang::SourceLocation getExprLoc() const

Declared at: clang/include/clang/AST/ExprCXX.h:152

clang::OverloadedOperatorKind getOperator() const

Description

Returns the kind of overloaded operator that this expression refers to.

Declared at: clang/include/clang/AST/ExprCXX.h:112

clang::SourceLocation getOperatorLoc() const

Description

Returns the location of the operator symbol in the expression. When \c getOperator()==OO_Call, this is the location of the right parentheses; when \c getOperator()==OO_Subscript, this is the location of the right bracket.

Declared at: clang/include/clang/AST/ExprCXX.h:150

clang::SourceRange getSourceRange() const

Declared at: clang/include/clang/AST/ExprCXX.h:162

clang::SourceRange getSourceRangeImpl() const

Declared at: clang/include/clang/AST/ExprCXX.h:91

static bool isAssignmentOp(
    clang::OverloadedOperatorKind Opc)

Declared at: clang/include/clang/AST/ExprCXX.h:117

Parameters

clang::OverloadedOperatorKind Opc

bool isAssignmentOp() const

Declared at: clang/include/clang/AST/ExprCXX.h:124

static bool isComparisonOp(
    clang::OverloadedOperatorKind Opc)

Declared at: clang/include/clang/AST/ExprCXX.h:126

Parameters

clang::OverloadedOperatorKind Opc

bool isComparisonOp() const

Declared at: clang/include/clang/AST/ExprCXX.h:140

bool isInfixBinaryOp() const

Description

Is this written as an infix binary operator?

Declared at: clang/include/clang/AST/ExprCXX.h:143