clang API Documentation

Public Types | Public Member Functions
clang::OverloadCandidateSet Class Reference

#include <Overload.h>

List of all members.

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
OverloadCandidateaddCandidate (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())

Detailed Description

OverloadCandidateSet - A set of overload candidates, used in C++ overload resolution (C++ 13.3).

Definition at line 738 of file Overload.h.


Member Typedef Documentation

Definition at line 776 of file Overload.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

OverloadCandidate& clang::OverloadCandidateSet::addCandidate ( unsigned  NumConversions = 0) [inline]
iterator clang::OverloadCandidateSet::begin ( ) [inline]
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.

Parameters:
CandidateSetthe set of candidate functions.
Locthe location of the function name (or operator symbol) for which overload resolution occurs.
Bestf overload resolution was successful or found a deleted function, Best points to the candidate function found.
Returns:
The result of overload resolution.

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 ( )
bool clang::OverloadCandidateSet::empty ( ) const [inline]
iterator clang::OverloadCandidateSet::end ( ) [inline]
SourceLocation clang::OverloadCandidateSet::getLocation ( ) const [inline]
bool clang::OverloadCandidateSet::isNewCandidate ( Decl F) [inline]
void clang::OverloadCandidateSet::NoteCandidates ( Sema S,
OverloadCandidateDisplayKind  OCD,
llvm::ArrayRef< Expr * >  Args,
const char *  Opc = 0,
SourceLocation  OpLoc = SourceLocation() 
)
size_t clang::OverloadCandidateSet::size ( ) const [inline]

The documentation for this class was generated from the following files: