diff options
Diffstat (limited to 'include/clang/Sema/Overload.h')
-rw-r--r-- | include/clang/Sema/Overload.h | 77 |
1 files changed, 8 insertions, 69 deletions
diff --git a/include/clang/Sema/Overload.h b/include/clang/Sema/Overload.h index c685843..b8bd14a 100644 --- a/include/clang/Sema/Overload.h +++ b/include/clang/Sema/Overload.h @@ -22,6 +22,7 @@ #include "clang/AST/Type.h" #include "clang/AST/UnresolvedSet.h" #include "clang/Sema/SemaFixItUtils.h" +#include "clang/Sema/TemplateDeduction.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Support/Allocator.h" @@ -241,7 +242,7 @@ namespace clang { QualType &ConstantType) const; bool isPointerConversionToBool() const; bool isPointerConversionToVoidPointer(ASTContext& Context) const; - void DebugPrint() const; + void dump() const; }; /// UserDefinedConversionSequence - Represents a user-defined @@ -287,7 +288,7 @@ namespace clang { /// that refers to \c ConversionFunction. DeclAccessPair FoundConversionFunction; - void DebugPrint() const; + void dump() const; }; /// Represents an ambiguous user-defined conversion sequence. @@ -405,9 +406,6 @@ namespace clang { /// ConversionKind - The kind of implicit conversion sequence. unsigned ConversionKind : 30; - /// \brief Whether the argument is an initializer list. - bool ListInitializationSequence : 1; - /// \brief Whether the target is really a std::initializer_list, and the /// sequence only represents the worst element conversion. bool StdInitializerListElement : 1; @@ -440,16 +438,14 @@ namespace clang { BadConversionSequence Bad; }; - ImplicitConversionSequence() - : ConversionKind(Uninitialized), ListInitializationSequence(false), - StdInitializerListElement(false) + ImplicitConversionSequence() + : ConversionKind(Uninitialized), StdInitializerListElement(false) {} ~ImplicitConversionSequence() { destruct(); } ImplicitConversionSequence(const ImplicitConversionSequence &Other) - : ConversionKind(Other.ConversionKind), - ListInitializationSequence(Other.ListInitializationSequence), + : ConversionKind(Other.ConversionKind), StdInitializerListElement(Other.StdInitializerListElement) { switch (ConversionKind) { @@ -535,16 +531,6 @@ namespace clang { Ambiguous.construct(); } - /// \brief Whether this sequence was created by the rules of - /// list-initialization sequences. - bool isListInitializationSequence() const { - return ListInitializationSequence; - } - - void setListInitializationSequence() { - ListInitializationSequence = true; - } - /// \brief Whether the target is really a std::initializer_list, and the /// sequence only represents the worst element conversion. bool isStdInitializerListElement() const { @@ -568,7 +554,7 @@ namespace clang { SourceLocation CaretLoc, const PartialDiagnostic &PDiag) const; - void DebugPrint() const; + void dump() const; }; enum OverloadFailureKind { @@ -656,53 +642,6 @@ namespace clang { /// \brief The number of call arguments that were explicitly provided, /// to be used while performing partial ordering of function templates. unsigned ExplicitCallArguments; - - /// A structure used to record information about a failed - /// template argument deduction. - struct DeductionFailureInfo { - /// A Sema::TemplateDeductionResult. - unsigned Result : 8; - - /// \brief Indicates whether a diagnostic is stored in Diagnostic. - unsigned HasDiagnostic : 1; - - /// \brief Opaque pointer containing additional data about - /// this deduction failure. - void *Data; - - /// \brief A diagnostic indicating why deduction failed. - union { - void *Align; - char Diagnostic[sizeof(PartialDiagnosticAt)]; - }; - - /// \brief Retrieve the diagnostic which caused this deduction failure, - /// if any. - PartialDiagnosticAt *getSFINAEDiagnostic(); - - /// \brief Retrieve the template parameter this deduction failure - /// refers to, if any. - TemplateParameter getTemplateParameter(); - - /// \brief Retrieve the template argument list associated with this - /// deduction failure, if any. - TemplateArgumentList *getTemplateArgumentList(); - - /// \brief Return the first template argument this deduction failure - /// refers to, if any. - const TemplateArgument *getFirstArg(); - - /// \brief Return the second template argument this deduction failure - /// refers to, if any. - const TemplateArgument *getSecondArg(); - - /// \brief Return the expression this deduction failure refers to, - /// if any. - Expr *getExpr(); - - /// \brief Free any memory associated with this deduction failure. - void Destroy(); - }; union { DeductionFailureInfo DeductionFailure; @@ -773,7 +712,7 @@ namespace clang { /// \brief Clear out all of the candidates. void clear(); - typedef SmallVector<OverloadCandidate, 16>::iterator iterator; + typedef SmallVectorImpl<OverloadCandidate>::iterator iterator; iterator begin() { return Candidates.begin(); } iterator end() { return Candidates.end(); } |