clang
7.0.0
|
OverloadCandidateSet - A set of overload candidates, used in C++ overload resolution (C++ 13.3). More...
#include "clang/Sema/Overload.h"
Public Types | |
enum | CandidateSetKind { CSK_Normal, CSK_Operator, CSK_InitByUserDefinedConversion, CSK_InitByConstructor } |
using | iterator = SmallVectorImpl< OverloadCandidate >::iterator |
Public Member Functions | |
OverloadCandidateSet (SourceLocation Loc, CandidateSetKind CSK) | |
OverloadCandidateSet (const OverloadCandidateSet &)=delete | |
OverloadCandidateSet & | operator= (const OverloadCandidateSet &)=delete |
~OverloadCandidateSet () | |
SourceLocation | getLocation () const |
CandidateSetKind | getKind () const |
bool | isNewCandidate (Decl *F) |
Determine when this overload candidate will be new to the overload set. More... | |
void | clear (CandidateSetKind CSK) |
Clear out all of the candidates. More... | |
iterator | begin () |
iterator | end () |
size_t | size () const |
bool | empty () const |
ConversionSequenceList | allocateConversionSequences (unsigned NumConversions) |
Allocate storage for conversion sequences for NumConversions conversions. More... | |
OverloadCandidate & | addCandidate (unsigned NumConversions=0, ConversionSequenceList Conversions=None) |
Add a new candidate with NumConversions conversion sequence slots to the overload set. More... | |
OverloadingResult | BestViableFunction (Sema &S, SourceLocation Loc, OverloadCandidateSet::iterator &Best) |
Find the best viable function on this overload set, if it exists. More... | |
void | NoteCandidates (Sema &S, OverloadCandidateDisplayKind OCD, ArrayRef< Expr *> Args, StringRef Opc="", SourceLocation Loc=SourceLocation(), llvm::function_ref< bool(OverloadCandidate &)> Filter=[](OverloadCandidate &) { return true;}) |
When overload resolution fails, prints diagnostic messages containing the candidates in the candidate set. More... | |
OverloadCandidateSet - A set of overload candidates, used in C++ overload resolution (C++ 13.3).
Definition at line 830 of file Overload.h.
Definition at line 917 of file Overload.h.
Definition at line 832 of file Overload.h.
|
inline |
Definition at line 899 of file Overload.h.
|
delete |
|
inline |
Definition at line 903 of file Overload.h.
|
inline |
Add a new candidate with NumConversions conversion sequence slots to the overload set.
Definition at line 941 of file Overload.h.
References clang::C, and clang::OverloadCandidate::Conversions.
Referenced by clang::Sema::AddBuiltinCandidate(), and clang::Sema::AddMethodCandidate().
|
inline |
Allocate storage for conversion sequences for NumConversions conversions.
Definition at line 928 of file Overload.h.
Referenced by clang::Sema::CheckNonDependentConversions().
|
inline |
Definition at line 919 of file Overload.h.
Referenced by mergeCandidatesWithResults(), and TryUserDefinedConversion().
OverloadingResult OverloadCandidateSet::BestViableFunction | ( | Sema & | S, |
SourceLocation | Loc, | ||
OverloadCandidateSet::iterator & | Best | ||
) |
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.
Loc | The location of the function name (or operator symbol) for which overload resolution occurs. |
Best | If overload resolution was successful or found a deleted function, Best points to the candidate function found. |
Definition at line 9319 of file SemaOverload.cpp.
Referenced by clang::Sema::buildOverloadedCallSet(), FindConditionalOverload(), and IsInitializerListConstructorConversion().
void OverloadCandidateSet::clear | ( | CandidateSetKind | CSK | ) |
Clear out all of the candidates.
Definition at line 851 of file SemaOverload.cpp.
Referenced by clang::Sema::BuildForRangeBeginEndCall(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), IsInitializerListConstructorConversion(), IsUserDefinedConversion(), ResolveConstructorOverload(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().
|
inline |
Definition at line 923 of file Overload.h.
Referenced by clang::Sema::buildOverloadedCallSet(), FinishOverloadedCallExpr(), mergeCandidatesWithResults(), and TryReferenceInitializationCore().
|
inline |
Definition at line 920 of file Overload.h.
Referenced by mergeCandidatesWithResults(), and TryUserDefinedConversion().
|
inline |
Definition at line 906 of file Overload.h.
Referenced by clang::Sema::AddOverloadCandidate(), and mergeCandidatesWithResults().
|
inline |
Definition at line 905 of file Overload.h.
Referenced by clang::Sema::CheckNonDependentConversions().
Determine when this overload candidate will be new to the overload set.
Definition at line 910 of file Overload.h.
References clang::CodeGen::clear(), and clang::Decl::getCanonicalDecl().
Referenced by clang::Sema::AddMethodCandidate(), and clang::Sema::AddOverloadCandidate().
void OverloadCandidateSet::NoteCandidates | ( | Sema & | S, |
OverloadCandidateDisplayKind | OCD, | ||
ArrayRef< Expr *> | Args, | ||
StringRef | Opc = "" , |
||
SourceLocation | OpLoc = SourceLocation() , |
||
llvm::function_ref< bool(OverloadCandidate &)> | Filter = [](OverloadCandidate&) { return true; } |
||
) |
When overload resolution fails, prints diagnostic messages containing the candidates in the candidate set.
Definition at line 10693 of file SemaOverload.cpp.
Referenced by CheckCXX98CompatAccessibleCopy(), CopyObject(), FinishOverloadedCallExpr(), and resolveAllocationOverload().
|
delete |
|
inline |
Definition at line 922 of file Overload.h.
Referenced by CopyObject(), and IsInitializerListConstructorConversion().