|
clang
5.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 } |
| typedef SmallVectorImpl < OverloadCandidate > ::iterator | iterator |
Public Member Functions | |
| OverloadCandidateSet (SourceLocation Loc, CandidateSetKind CSK) | |
| ~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 () |
| 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, bool UserDefinedConversion=false) |
| 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;}) |
| PrintOverloadCandidates - 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 724 of file Overload.h.
Definition at line 800 of file Overload.h.
Definition at line 726 of file Overload.h.
|
inline |
Definition at line 784 of file Overload.h.
|
inline |
Definition at line 786 of file Overload.h.
|
inline |
Add a new candidate with NumConversions conversion sequence slots to the overload set.
Definition at line 823 of file Overload.h.
References allocateConversionSequences(), and clang::OverloadCandidate::Conversions.
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().
|
inline |
Allocate storage for conversion sequences for NumConversions conversions.
Definition at line 810 of file Overload.h.
References I.
Referenced by addCandidate(), and clang::Sema::CheckNonDependentConversions().
|
inline |
Definition at line 801 of file Overload.h.
Referenced by clang::Sema::AddArgumentDependentLookupCandidates(), BestViableFunction(), markUnaddressableCandidatesUnviable(), mergeCandidatesWithResults(), and NoteCandidates().
| OverloadingResult 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.
| 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 9081 of file SemaOverload.cpp.
References begin(), clang::Sema::CFP_SameSide, clang::Sema::CFP_WrongSide, clang::Sema::CurContext, clang::Sema::diagnoseEquivalentInternalLinkageDeclarations(), end(), clang::OverloadCandidate::Function, clang::Sema::getLangOpts(), clang::Sema::IdentifyCUDAPreference(), clang::isBetterOverloadCandidate(), clang::Sema::isEquivalentInternalLinkageDeclaration(), clang::Sema::isFunctionConsideredUnavailable(), clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, and clang::OverloadCandidate::Viable.
Referenced by clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildForRangeBeginEndCall(), clang::Sema::BuildOverloadedArrowExpr(), clang::Sema::BuildOverloadedCallExpr(), clang::Sema::buildOverloadedCallSet(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), clang::InitializationSequence::Diagnose(), FindConditionalOverload(), IsInitializerListConstructorConversion(), IsUserDefinedConversion(), clang::Sema::LookupSpecialMember(), clang::Sema::PerformContextualImplicitConversion(), ResolveConstructorOverload(), TryRefInitWithConversionFunction(), TryTypoCorrectionForCall(), and TryUserDefinedConversion().
| void OverloadCandidateSet::clear | ( | ) |
Clear out all of the candidates.
Definition at line 840 of file SemaOverload.cpp.
Referenced by clang::Sema::BuildForRangeBeginEndCall(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), IsUserDefinedConversion(), ResolveConstructorOverload(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().
|
inline |
Definition at line 805 of file Overload.h.
Referenced by clang::Sema::BuildForRangeBeginEndCall(), clang::Sema::BuildOverloadedArrowExpr(), clang::Sema::buildOverloadedCallSet(), clang::Sema::CodeCompleteCall(), clang::Sema::CreateOverloadedArraySubscriptExpr(), FinishOverloadedCallExpr(), mergeCandidatesWithResults(), tryDiagnoseOverloadedCast(), and TryReferenceInitializationCore().
|
inline |
Definition at line 802 of file Overload.h.
Referenced by clang::Sema::AddArgumentDependentLookupCandidates(), BestViableFunction(), markUnaddressableCandidatesUnviable(), mergeCandidatesWithResults(), and NoteCandidates().
|
inline |
Definition at line 789 of file Overload.h.
Referenced by clang::Sema::AddOverloadCandidate().
|
inline |
Definition at line 788 of file Overload.h.
Referenced by clang::Sema::AddConversionCandidate(), clang::Sema::AddMethodCandidate(), clang::Sema::AddMethodTemplateCandidate(), clang::Sema::AddSurrogateCandidate(), clang::Sema::AddTemplateConversionCandidate(), clang::Sema::AddTemplateOverloadCandidate(), and clang::Sema::CheckNonDependentConversions().
Determine when this overload candidate will be new to the overload set.
Definition at line 793 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 OverloadCandidateSet::NoteCandidates | ( | Sema & | S, |
| OverloadCandidateDisplayKind | OCD, | ||
| ArrayRef< Expr * > | Args, | ||
| StringRef | Opc = "", |
||
| SourceLocation | OpLoc = SourceLocation(), |
||
| llvm::function_ref< bool(OverloadCandidate &)> | Filter = [](OverloadCandidate&) { return true; } |
||
| ) |
PrintOverloadCandidates - When overload resolution fails, prints diagnostic messages containing the candidates in the candidate set.
Definition at line 10427 of file SemaOverload.cpp.
References begin(), CompleteNonViableCandidate(), clang::Sema::Diag(), clang::Sema::Diags, E, end(), clang::OverloadCandidate::Function, clang::DiagnosticsEngine::getShowOverloads(), I, clang::OverloadCandidate::IsSurrogate, NoteAmbiguousUserConversions(), NoteBuiltinOperatorCandidate(), NoteFunctionCandidate(), NoteSurrogateCandidate(), clang::OCD_AllCandidates, clang::Ovl_Best, size(), and clang::OverloadCandidate::Viable.
Referenced by clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildOverloadedArrowExpr(), CheckCXX98CompatAccessibleCopy(), CopyObject(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), clang::InitializationSequence::Diagnose(), FinishOverloadedCallExpr(), and tryDiagnoseOverloadedCast().
|
inline |
Definition at line 804 of file Overload.h.
Referenced by clang::Sema::BuildOverloadedArrowExpr(), CopyObject(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), IsInitializerListConstructorConversion(), IsUserDefinedConversion(), NoteCandidates(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().
1.8.6