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, Expr **args, unsigned numargs, QualType t, ExprValueKind VK, SourceLocation operatorloc) | |
| CXXOperatorCallExpr (ASTContext &C, EmptyShell Empty) | |
| OverloadedOperatorKind | getOperator () const |
| void | setOperator (OverloadedOperatorKind Kind) |
| SourceLocation | getOperatorLoc () const |
| SourceRange | getSourceRange () const |
Static Public Member Functions | |
| static bool | classof (const Stmt *T) |
| static bool | classof (const CXXOperatorCallExpr *) |
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, | ||
| Expr ** | args, | ||
| unsigned | numargs, | ||
| QualType | t, | ||
| ExprValueKind | VK, | ||
| SourceLocation | operatorloc | ||
| ) | [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 78 of file ExprCXX.h.
References clang::Stmt::getStmtClass().
| static bool clang::CXXOperatorCallExpr::classof | ( | const CXXOperatorCallExpr * | ) | [inline, static] |
| OverloadedOperatorKind clang::CXXOperatorCallExpr::getOperator | ( | ) | const [inline] |
getOperator - Returns the kind of overloaded operator that this expression refers to.
Definition at line 66 of file ExprCXX.h.
Referenced by DecodeOperatorCall(), getSourceRange(), and clang::Expr::isUnusedResultAWarning().
| SourceLocation clang::CXXOperatorCallExpr::getOperatorLoc | ( | ) | const [inline] |
getOperatorLoc - 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 74 of file ExprCXX.h.
References clang::CallExpr::getRParenLoc().
Referenced by getSourceRange(), and clang::Expr::isUnusedResultAWarning().
| SourceRange CXXOperatorCallExpr::getSourceRange | ( | ) | const |
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::CallExpr.
Definition at line 411 of file ExprCXX.cpp.
References clang::CallExpr::getArg(), clang::CallExpr::getNumArgs(), getOperator(), getOperatorLoc(), clang::CallExpr::getRParenLoc(), and clang::Stmt::getSourceRange().
Referenced by clang::Expr::isUnusedResultAWarning().
| void clang::CXXOperatorCallExpr::setOperator | ( | OverloadedOperatorKind | Kind | ) | [inline] |