clang
10.0.0git
|
Information about operator rewrites to consider when adding operator functions to a candidate set. More...
#include "clang/Sema/Overload.h"
Public Member Functions | |
OperatorRewriteInfo () | |
OperatorRewriteInfo (OverloadedOperatorKind Op, bool AllowRewritten) | |
bool | isRewrittenOperator (const FunctionDecl *FD) |
Would use of this function result in a rewrite using a different operator? More... | |
bool | isAcceptableCandidate (const FunctionDecl *FD) |
OverloadCandidateRewriteKind | getRewriteKind (const FunctionDecl *FD, OverloadCandidateParamOrder PO) |
Determine the kind of rewrite that should be performed for this candidate. More... | |
bool | shouldAddReversed (OverloadedOperatorKind Op) |
Determine whether we should consider looking for and adding reversed candidates for operator Op. More... | |
bool | shouldAddReversed (ASTContext &Ctx, const FunctionDecl *FD) |
Determine whether we should add a rewritten candidate for FD with reversed parameter order. More... | |
Public Attributes | |
OverloadedOperatorKind | OriginalOperator |
The original operator as written in the source. More... | |
bool | AllowRewrittenCandidates |
Whether we should include rewritten candidates in the overload set. More... | |
Information about operator rewrites to consider when adding operator functions to a candidate set.
Definition at line 922 of file Overload.h.
|
inline |
Definition at line 923 of file Overload.h.
|
inline |
Definition at line 925 of file Overload.h.
|
inline |
Determine the kind of rewrite that should be performed for this candidate.
Definition at line 957 of file Overload.h.
References clang::CRK_DifferentOperator, clang::CRK_None, clang::CRK_Reversed, clang::Default, and clang::Reversed.
|
inline |
Definition at line 940 of file Overload.h.
References clang::DeclarationName::getCXXOverloadedOperator(), clang::NamedDecl::getDeclName(), and clang::getRewrittenOverloadedOperator().
Referenced by clang::Sema::AddNonMemberOperatorCandidates().
|
inline |
Would use of this function result in a rewrite using a different operator?
Definition at line 935 of file Overload.h.
References clang::DeclarationName::getCXXOverloadedOperator(), and clang::NamedDecl::getDeclName().
bool OverloadCandidateSet::OperatorRewriteInfo::shouldAddReversed | ( | OverloadedOperatorKind | Op | ) |
Determine whether we should consider looking for and adding reversed candidates for operator Op.
Definition at line 884 of file SemaOverload.cpp.
Referenced by clang::Sema::AddNonMemberOperatorCandidates(), and clang::Sema::LookupOverloadedBinOp().
bool OverloadCandidateSet::OperatorRewriteInfo::shouldAddReversed | ( | ASTContext & | Ctx, |
const FunctionDecl * | FD | ||
) |
Determine whether we should add a rewritten candidate for FD
with reversed parameter order.
Definition at line 891 of file SemaOverload.cpp.
References clang::DeclarationName::getCXXOverloadedOperator(), clang::NamedDecl::getDeclName(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::ASTContext::hasSameUnqualifiedType(), and clang::ovl_fail_bad_deduction.
bool clang::OverloadCandidateSet::OperatorRewriteInfo::AllowRewrittenCandidates |
Whether we should include rewritten candidates in the overload set.
Definition at line 931 of file Overload.h.
Referenced by clang::Sema::LookupOverloadedBinOp().
OverloadedOperatorKind clang::OverloadCandidateSet::OperatorRewriteInfo::OriginalOperator |
The original operator as written in the source.
Definition at line 929 of file Overload.h.