clang 20.0.0git
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 "clang/Sema/TemplateDeduction.h"

Public Member Functions

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

Public Attributes

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

Detailed Description

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

Definition at line 259 of file TemplateDeduction.h.

Member Function Documentation

◆ Destroy()

void DeductionFailureInfo::Destroy ( )

◆ getCallArgIndex()

std::optional< unsigned > DeductionFailureInfo::getCallArgIndex ( )

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

Definition at line 1011 of file SemaOverload.cpp.

References Data, clang::DeducedMismatch, clang::DeducedMismatchNested, and Result.

Referenced by DiagnoseBadDeduction().

◆ getFirstArg()

const TemplateArgument * DeductionFailureInfo::getFirstArg ( )

◆ getResult()

TemplateDeductionResult clang::DeductionFailureInfo::getResult ( ) const
inline

Definition at line 300 of file TemplateDeduction.h.

References Result.

Referenced by CheckArityMismatch(), and DiagnoseBadDeduction().

◆ getSecondArg()

const TemplateArgument * DeductionFailureInfo::getSecondArg ( )

◆ getSFINAEDiagnostic()

PartialDiagnosticAt * DeductionFailureInfo::getSFINAEDiagnostic ( )

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

Definition at line 871 of file SemaOverload.cpp.

References Diagnostic, and HasDiagnostic.

Referenced by Destroy(), and DiagnoseBadDeduction().

◆ getTemplateArgumentList()

TemplateArgumentList * DeductionFailureInfo::getTemplateArgumentList ( )

◆ getTemplateParameter()

TemplateParameter DeductionFailureInfo::getTemplateParameter ( )

Member Data Documentation

◆ Data

void* clang::DeductionFailureInfo::Data

◆ Diagnostic

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

A diagnostic indicating why deduction failed.

Definition at line 271 of file TemplateDeduction.h.

Referenced by getSFINAEDiagnostic().

◆ HasDiagnostic

unsigned clang::DeductionFailureInfo::HasDiagnostic

Indicates whether a diagnostic is stored in Diagnostic.

Definition at line 264 of file TemplateDeduction.h.

Referenced by Destroy(), and getSFINAEDiagnostic().

◆ Result

unsigned clang::DeductionFailureInfo::Result

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