clang  3.9.0
Public Member Functions | Public Attributes | List of all members
clang::DeductionFailureInfo Struct Reference

A structure used to record information about a failed template argument deduction, for diagnosis. More...

#include <TemplateDeduction.h>

Collaboration diagram for clang::DeductionFailureInfo:
[legend]

Public Member Functions

PartialDiagnosticAtgetSFINAEDiagnostic ()
 Retrieve the diagnostic which caused this deduction failure, if any. More...
 
TemplateParameter getTemplateParameter ()
 Retrieve the template parameter this deduction failure refers to, if any. More...
 
TemplateArgumentListgetTemplateArgumentList ()
 Retrieve the template argument list associated with this deduction failure, if any. More...
 
const TemplateArgumentgetFirstArg ()
 Return the first template argument this deduction failure refers to, if any. More...
 
const TemplateArgumentgetSecondArg ()
 Return the second template argument this deduction failure refers to, if any. More...
 
ExprgetExpr ()
 Return the expression this deduction failure refers to, if any. More...
 
llvm::Optional< unsignedgetCallArgIndex ()
 Return the index of the call argument that this deduction failure refers to, if any. More...
 
void Destroy ()
 Free any memory associated with this deduction failure. More...
 

Public Attributes

unsigned Result: 8
 A Sema::TemplateDeductionResult. More...
 
unsigned HasDiagnostic: 1
 Indicates whether a diagnostic is stored in Diagnostic. More...
 
void * Data
 Opaque pointer containing additional data about this deduction failure. More...
 
union {
   void *   Align
 
   char   Diagnostic [sizeof(PartialDiagnosticAt)]
 
}; 
 A diagnostic indicating why deduction failed. More...
 

Detailed Description

A structure used to record information about a failed template argument deduction, for diagnosis.

Definition at line 190 of file TemplateDeduction.h.

Member Function Documentation

void DeductionFailureInfo::Destroy ( )
llvm::Optional< unsigned > DeductionFailureInfo::getCallArgIndex ( )

Return the index of the call argument that this deduction failure refers to, if any.

Definition at line 796 of file SemaOverload.cpp.

References clang::None, clang::Result, and clang::Sema::TDK_DeducedMismatch.

Referenced by DiagnoseBadDeduction().

Expr * DeductionFailureInfo::getExpr ( )

Return the expression this deduction failure refers to, if any.

Definition at line 788 of file SemaOverload.cpp.

References clang::Result, and clang::Sema::TDK_FailedOverloadResolution.

Referenced by DiagnoseBadDeduction().

const TemplateArgument * DeductionFailureInfo::getFirstArg ( )
const TemplateArgument * DeductionFailureInfo::getSecondArg ( )
PartialDiagnosticAt * DeductionFailureInfo::getSFINAEDiagnostic ( )

Retrieve the diagnostic which caused this deduction failure, if any.

Definition at line 670 of file SemaOverload.cpp.

Referenced by DiagnoseBadDeduction().

TemplateArgumentList * DeductionFailureInfo::getTemplateArgumentList ( )
TemplateParameter DeductionFailureInfo::getTemplateParameter ( )

Member Data Documentation

union { ... }

A diagnostic indicating why deduction failed.

void* clang::DeductionFailureInfo::Align

Definition at line 203 of file TemplateDeduction.h.

void* clang::DeductionFailureInfo::Data

Opaque pointer containing additional data about this deduction failure.

Definition at line 199 of file TemplateDeduction.h.

Referenced by clang::Sema::AddConversionCandidate(), clang::Sema::AddOverloadCandidate(), clang::Sema::AddSurrogateCandidate(), DiagnoseFailedEnableIfAttr(), and clang::MakeDeductionFailureInfo().

char clang::DeductionFailureInfo::Diagnostic[sizeof(PartialDiagnosticAt)]

Definition at line 204 of file TemplateDeduction.h.

Referenced by clang::MakeDeductionFailureInfo().

unsigned clang::DeductionFailureInfo::HasDiagnostic

Indicates whether a diagnostic is stored in Diagnostic.

Definition at line 195 of file TemplateDeduction.h.

Referenced by clang::MakeDeductionFailureInfo().

unsigned clang::DeductionFailureInfo::Result

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