clang API Documentation
A call to an overloaded operator written using operator syntax. More...
#include <ExprCXX.h>
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 |
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.
clang::CXXOperatorCallExpr::CXXOperatorCallExpr | ( | ASTContext & | C, |
OverloadedOperatorKind | Op, | ||
Expr * | fn, | ||
ArrayRef< Expr * > | args, | ||
QualType | t, | ||
ExprValueKind | VK, | ||
SourceLocation | operatorloc, | ||
bool | fpContractable | ||
) | [inline] |
clang::CXXOperatorCallExpr::CXXOperatorCallExpr | ( | ASTContext & | C, |
EmptyShell | Empty | ||
) | [inline, explicit] |
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().
SourceLocation clang::CXXOperatorCallExpr::getLocEnd | ( | ) | const [inline] |
Reimplemented from clang::CallExpr.
Definition at line 90 of file ExprCXX.h.
References clang::SourceRange::getEnd().
SourceLocation clang::CXXOperatorCallExpr::getLocStart | ( | ) | const [inline] |
Reimplemented from clang::CallExpr.
Definition at line 89 of file ExprCXX.h.
References clang::SourceRange::getBegin().
OverloadedOperatorKind clang::CXXOperatorCallExpr::getOperator | ( | ) | const [inline] |
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().
SourceLocation clang::CXXOperatorCallExpr::getOperatorLoc | ( | ) | const [inline] |
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().
SourceRange clang::CXXOperatorCallExpr::getSourceRange | ( | ) | const [inline] |
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().
bool clang::CXXOperatorCallExpr::isFPContractable | ( | ) | const [inline] |
void clang::CXXOperatorCallExpr::setFPContractable | ( | bool | FPC | ) | [inline] |
friend class ASTStmtReader [friend] |
Reimplemented from clang::Stmt.
friend class ASTStmtWriter [friend] |
Reimplemented from clang::Stmt.