clang API Documentation

Public Member Functions | Static Public Member Functions | Friends
clang::CXXOperatorCallExpr Class Reference

A call to an overloaded operator written using operator syntax. More...

#include <ExprCXX.h>

Inheritance diagram for clang::CXXOperatorCallExpr:
Inheritance graph
[legend]
Collaboration diagram for clang::CXXOperatorCallExpr:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CXXOperatorCallExpr (ASTContext &C, OverloadedOperatorKind Op, Expr *fn, ArrayRef< Expr * > args, QualType t, ExprValueKind VK, SourceLocation operatorloc, bool fpContractable)
 CXXOperatorCallExpr (ASTContext &C, EmptyShell Empty)
OverloadedOperatorKind getOperator () const
 Returns the kind of overloaded operator that this expression refers to.
SourceLocation getOperatorLoc () const
 Returns the location of the operator symbol in the expression.
SourceLocation getLocStart () const LLVM_READONLY
SourceLocation getLocEnd () const LLVM_READONLY
SourceRange getSourceRange () const
void setFPContractable (bool FPC)
bool isFPContractable () const

Static Public Member Functions

static bool classof (const Stmt *T)

Friends

class ASTStmtReader
class ASTStmtWriter

Detailed 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.

Definition at line 54 of file ExprCXX.h.


Constructor & Destructor Documentation

clang::CXXOperatorCallExpr::CXXOperatorCallExpr ( ASTContext C,
OverloadedOperatorKind  Op,
Expr fn,
ArrayRef< Expr * >  args,
QualType  t,
ExprValueKind  VK,
SourceLocation  operatorloc,
bool  fpContractable 
) [inline]

Definition at line 66 of file ExprCXX.h.

Definition at line 74 of file ExprCXX.h.


Member Function Documentation

static bool clang::CXXOperatorCallExpr::classof ( const Stmt T) [inline, static]

Reimplemented from clang::CallExpr.

Definition at line 93 of file ExprCXX.h.

References clang::Stmt::getStmtClass().

Reimplemented from clang::CallExpr.

Definition at line 90 of file ExprCXX.h.

References clang::SourceRange::getEnd().

Reimplemented from clang::CallExpr.

Definition at line 89 of file ExprCXX.h.

References clang::SourceRange::getBegin().

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

Definition at line 80 of file ExprCXX.h.

Referenced by DecodeOperatorCall(), clang::Expr::isUnusedResultAWarning(), and clang::consumed::ConsumedStmtVisitor::VisitCXXOperatorCallExpr().

Returns the location of the operator symbol in the expression.

When getOperator()==OO_Call, this is the location of the right parentheses; when getOperator()==OO_Subscript, this is the location of the right bracket.

Definition at line 87 of file ExprCXX.h.

References clang::CallExpr::getRParenLoc().

Referenced by DiagnoseShiftCompare(), and clang::Expr::isUnusedResultAWarning().

SourceLocation tokens are not useful in isolation - they are low level value objects created/interpreted by SourceManager. We assume AST clients will have a pointer to the respective SourceManager.

Reimplemented from clang::Stmt.

Definition at line 91 of file ExprCXX.h.

Referenced by DiagnoseShiftCompare(), and clang::Expr::isUnusedResultAWarning().

Definition at line 103 of file ExprCXX.h.

Definition at line 99 of file ExprCXX.h.


Friends And Related Function Documentation

friend class ASTStmtReader [friend]

Reimplemented from clang::Stmt.

Definition at line 105 of file ExprCXX.h.

friend class ASTStmtWriter [friend]

Reimplemented from clang::Stmt.

Definition at line 106 of file ExprCXX.h.


The documentation for this class was generated from the following files: