clang API Documentation

Public Types | Public Member Functions | Public Attributes
clang::sema::TemplateDeductionInfo Class Reference

Provides information about an attempted template argument deduction, whose success or failure was described by a TemplateDeductionResult value. More...

#include <TemplateDeduction.h>

Collaboration diagram for clang::sema::TemplateDeductionInfo:
Collaboration graph
[legend]

List of all members.

Public Types

typedef SmallVectorImpl
< PartialDiagnosticAt >
::const_iterator 
diag_iterator
 Iterator over the set of suppressed diagnostics.

Public Member Functions

 TemplateDeductionInfo (SourceLocation Loc)
SourceLocation getLocation () const
 Returns the location at which template argument is occurring.
TemplateArgumentListtake ()
 Take ownership of the deduced template argument list.
void takeSFINAEDiagnostic (PartialDiagnosticAt &PD)
 Take ownership of the SFINAE diagnostic.
void reset (TemplateArgumentList *NewDeduced)
 Provide a new template argument list that contains the results of template argument deduction.
bool hasSFINAEDiagnostic () const
 Is a SFINAE diagnostic available?
void addSFINAEDiagnostic (SourceLocation Loc, PartialDiagnostic PD)
 Set the diagnostic which caused the SFINAE failure.
void addSuppressedDiagnostic (SourceLocation Loc, PartialDiagnostic PD)
 Add a new diagnostic to the set of diagnostics.
diag_iterator diag_begin () const
 Returns an iterator at the beginning of the sequence of suppressed diagnostics.
diag_iterator diag_end () const
 Returns an iterator at the end of the sequence of suppressed diagnostics.

Public Attributes

TemplateParameter Param
 The template parameter to which a template argument deduction failure refers.
TemplateArgument FirstArg
 The first template argument to which the template argument deduction failure refers.
TemplateArgument SecondArg
 The second template argument to which the template argument deduction failure refers.
ExprExpression
 The expression which caused a deduction failure.
SmallVector< DeducedPack *, 8 > PendingDeducedPacks
 Information on packs that we're currently expanding.

Detailed Description

Provides information about an attempted template argument deduction, whose success or failure was described by a TemplateDeductionResult value.

Definition at line 31 of file TemplateDeduction.h.


Member Typedef Documentation

Iterator over the set of suppressed diagnostics.

Definition at line 112 of file TemplateDeduction.h.


Constructor & Destructor Documentation

clang::sema::TemplateDeductionInfo::TemplateDeductionInfo ( SourceLocation  Loc) [inline]

Definition at line 51 of file TemplateDeduction.h.


Member Function Documentation

Set the diagnostic which caused the SFINAE failure.

Definition at line 89 of file TemplateDeduction.h.

Add a new diagnostic to the set of diagnostics.

Definition at line 101 of file TemplateDeduction.h.

Returns an iterator at the beginning of the sequence of suppressed diagnostics.

Definition at line 116 of file TemplateDeduction.h.

Referenced by clang::Sema::FinishTemplateArgumentDeduction().

Returns an iterator at the end of the sequence of suppressed diagnostics.

Definition at line 120 of file TemplateDeduction.h.

Referenced by clang::Sema::FinishTemplateArgumentDeduction().

Is a SFINAE diagnostic available?

Definition at line 84 of file TemplateDeduction.h.

Referenced by clang::MakeDeductionFailureInfo().

Provide a new template argument list that contains the results of template argument deduction.

Definition at line 79 of file TemplateDeduction.h.

Referenced by FinishTemplateArgumentDeduction(), clang::Sema::FinishTemplateArgumentDeduction(), and clang::Sema::SubstituteExplicitTemplateArguments().

Take ownership of the deduced template argument list.

Definition at line 62 of file TemplateDeduction.h.

Referenced by clang::Sema::FinishTemplateArgumentDeduction(), and clang::MakeDeductionFailureInfo().

Take ownership of the SFINAE diagnostic.

Definition at line 69 of file TemplateDeduction.h.

Referenced by clang::MakeDeductionFailureInfo().


Member Data Documentation

The expression which caused a deduction failure.

TDK_FailedOverloadResolution: this argument is the reference to an overloaded function which could not be resolved to a specific function.

Definition at line 165 of file TemplateDeduction.h.

Referenced by DeduceTemplateArgumentByListElement(), and clang::MakeDeductionFailureInfo().

The first template argument to which the template argument deduction failure refers.

Depending on the result of the template argument deduction, this template argument may have different meanings:

TDK_Inconsistent: this argument is the first value deduced for the corresponding template parameter.

TDK_SubstitutionFailure: this argument is the template argument we were instantiating when we encountered an error.

TDK_NonDeducedMismatch: this is the component of the 'parameter' of the deduction, directly provided in the source code.

Definition at line 149 of file TemplateDeduction.h.

Referenced by DeduceNonTypeTemplateArgument(), DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), FinishTemplateArgumentDeduction(), and clang::MakeDeductionFailureInfo().

The template parameter to which a template argument deduction failure refers.

Depending on the result of template argument deduction, this template parameter may have different meanings:

TDK_Incomplete: this is the first template parameter whose corresponding template argument was not deduced.

TDK_Inconsistent: this is the template parameter for which two different template argument values were deduced.

Definition at line 133 of file TemplateDeduction.h.

Referenced by DeduceNonTypeTemplateArgument(), DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), FinishTemplateArgumentDeduction(), clang::Sema::FinishTemplateArgumentDeduction(), clang::MakeDeductionFailureInfo(), and clang::Sema::SubstituteExplicitTemplateArguments().

Information on packs that we're currently expanding.

FIXME: This should be kept internal to SemaTemplateDeduction.

Definition at line 170 of file TemplateDeduction.h.

Referenced by PackDeductionScope::PackDeductionScope().

The second template argument to which the template argument deduction failure refers.

TDK_NonDeducedMismatch: this is the mismatching component of the 'argument' of the deduction, from which we are deducing arguments.

FIXME: Finish documenting this.

Definition at line 158 of file TemplateDeduction.h.

Referenced by DeduceNonTypeTemplateArgument(), DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), FinishTemplateArgumentDeduction(), and clang::MakeDeductionFailureInfo().


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