clang API Documentation
#include <Overload.h>
Public Types | |
| typedef SmallVector < OverloadCandidate, 16 > ::iterator | iterator |
Public Member Functions | |
| OverloadCandidateSet (SourceLocation Loc) | |
| ~OverloadCandidateSet () | |
| SourceLocation | getLocation () const |
| bool | isNewCandidate (Decl *F) |
| Determine when this overload candidate will be new to the overload set. | |
| void | clear () |
| Clear out all of the candidates. | |
| iterator | begin () |
| iterator | end () |
| size_t | size () const |
| bool | empty () const |
| OverloadCandidate & | addCandidate (unsigned NumConversions=0) |
| Add a new candidate with NumConversions conversion sequence slots to the overload set. | |
| OverloadingResult | BestViableFunction (Sema &S, SourceLocation Loc, OverloadCandidateSet::iterator &Best, bool UserDefinedConversion=false) |
| Find the best viable function on this overload set, if it exists. | |
| void | NoteCandidates (Sema &S, OverloadCandidateDisplayKind OCD, llvm::ArrayRef< Expr * > Args, const char *Opc=0, SourceLocation Loc=SourceLocation()) |
OverloadCandidateSet - A set of overload candidates, used in C++ overload resolution (C++ 13.3).
Definition at line 738 of file Overload.h.
| typedef SmallVector<OverloadCandidate, 16>::iterator clang::OverloadCandidateSet::iterator |
Definition at line 776 of file Overload.h.
| clang::OverloadCandidateSet::OverloadCandidateSet | ( | SourceLocation | Loc | ) | [inline] |
Definition at line 755 of file Overload.h.
| clang::OverloadCandidateSet::~OverloadCandidateSet | ( | ) | [inline] |
Definition at line 756 of file Overload.h.
References begin(), end(), and clang::ovl_fail_bad_deduction.
| OverloadCandidate& clang::OverloadCandidateSet::addCandidate | ( | unsigned | NumConversions = 0 | ) | [inline] |
Add a new candidate with NumConversions conversion sequence slots to the overload set.
Definition at line 785 of file Overload.h.
References clang::OverloadCandidate::Conversions, and clang::OverloadCandidate::NumConversions.
Referenced by clang::Sema::AddBuiltinCandidate(), clang::Sema::AddConversionCandidate(), clang::Sema::AddMethodCandidate(), clang::Sema::AddMethodTemplateCandidate(), clang::Sema::AddOverloadCandidate(), clang::Sema::AddSurrogateCandidate(), clang::Sema::AddTemplateConversionCandidate(), and clang::Sema::AddTemplateOverloadCandidate().
| iterator clang::OverloadCandidateSet::begin | ( | ) | [inline] |
Definition at line 777 of file Overload.h.
Referenced by clang::Sema::AddArgumentDependentLookupCandidates(), clang::Sema::CodeCompleteCall(), and ~OverloadCandidateSet().
| OverloadingResult clang::OverloadCandidateSet::BestViableFunction | ( | Sema & | S, |
| SourceLocation | Loc, | ||
| OverloadCandidateSet::iterator & | Best, | ||
| bool | UserDefinedConversion = false |
||
| ) |
Find the best viable function on this overload set, if it exists.
Computes the best viable function (C++ 13.3.3) within an overload candidate set.
| CandidateSet | the set of candidate functions. |
| Loc | the location of the function name (or operator symbol) for which overload resolution occurs. |
| Best | f overload resolution was successful or found a deleted function, Best points to the candidate function found. |
Definition at line 7740 of file SemaOverload.cpp.
References clang::isBetterOverloadCandidate(), clang::Sema::isFunctionConsideredUnavailable(), clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, and clang::OR_Success.
Referenced by clang::Sema::BuildOverloadedArrowExpr(), CheckCXX98CompatAccessibleCopy(), CopyObject(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), clang::InitializationSequence::Diagnose(), clang::Sema::FindAllocationOverload(), FindConditionalOverload(), clang::IsInitializerListConstructorConversion(), clang::IsUserDefinedConversion(), clang::Sema::LookupSpecialMember(), ResolveConstructorOverload(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().
| void clang::OverloadCandidateSet::clear | ( | ) |
Clear out all of the candidates.
Definition at line 728 of file SemaOverload.cpp.
Referenced by clang::IsUserDefinedConversion(), ResolveConstructorOverload(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().
| bool clang::OverloadCandidateSet::empty | ( | ) | const [inline] |
Definition at line 781 of file Overload.h.
Referenced by clang::Sema::BuildOverloadedArrowExpr(), clang::Sema::CodeCompleteCall(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::DiagnoseMultipleUserDefinedConversion(), tryDiagnoseOverloadedCast(), and TryReferenceInitializationCore().
| iterator clang::OverloadCandidateSet::end | ( | ) | [inline] |
Definition at line 778 of file Overload.h.
Referenced by clang::Sema::AddArgumentDependentLookupCandidates(), clang::Sema::CodeCompleteCall(), and ~OverloadCandidateSet().
| SourceLocation clang::OverloadCandidateSet::getLocation | ( | ) | const [inline] |
Definition at line 765 of file Overload.h.
Referenced by clang::Sema::AddMethodTemplateCandidate(), clang::Sema::AddTemplateConversionCandidate(), and clang::Sema::AddTemplateOverloadCandidate().
| bool clang::OverloadCandidateSet::isNewCandidate | ( | Decl * | F | ) | [inline] |
Determine when this overload candidate will be new to the overload set.
Definition at line 769 of file Overload.h.
References clang::Decl::getCanonicalDecl().
Referenced by clang::Sema::AddConversionCandidate(), clang::Sema::AddMethodCandidate(), clang::Sema::AddMethodTemplateCandidate(), clang::Sema::AddOverloadCandidate(), clang::Sema::AddSurrogateCandidate(), clang::Sema::AddTemplateConversionCandidate(), and clang::Sema::AddTemplateOverloadCandidate().
| void clang::OverloadCandidateSet::NoteCandidates | ( | Sema & | S, |
| OverloadCandidateDisplayKind | OCD, | ||
| llvm::ArrayRef< Expr * > | Args, | ||
| const char * | Opc = 0, |
||
| SourceLocation | OpLoc = SourceLocation() |
||
| ) |
PrintOverloadCandidates - When overload resolution fails, prints diagnostic messages containing the candidates in the candidate set.
Definition at line 8689 of file SemaOverload.cpp.
References clang::Sema::Diag(), clang::Sema::Diags, clang::OverloadCandidate::Function, clang::DiagnosticsEngine::getShowOverloads(), clang::OverloadCandidate::IsSurrogate, clang::OCD_AllCandidates, and clang::OverloadCandidate::Viable.
Referenced by clang::Sema::BuildOverloadedArrowExpr(), CheckCXX98CompatAccessibleCopy(), CopyObject(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), clang::InitializationSequence::Diagnose(), clang::Sema::DiagnoseMultipleUserDefinedConversion(), clang::Sema::FindAllocationOverload(), and tryDiagnoseOverloadedCast().
| size_t clang::OverloadCandidateSet::size | ( | ) | const [inline] |
Definition at line 780 of file Overload.h.
Referenced by clang::Sema::BuildOverloadedArrowExpr(), CopyObject(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), clang::IsInitializerListConstructorConversion(), clang::IsUserDefinedConversion(), TryConstructorInitialization(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().