clang 10.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"`

Collaboration diagram for clang::DeductionFailureInfo:
[legend]

## Public Member Functions
PartialDiagnosticAt * | getSFINAEDiagnostic ()
| 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...
TemplateArgumentList * | getTemplateArgumentList ()
| Retrieve the template argument list associated with this deduction failure, if any. More...
const TemplateArgument * | getFirstArg ()
| Return the first template argument this deduction failure refers to, if any. More...
const TemplateArgument * | getSecondArg ()
| Return the second template argument this deduction failure refers to, if any. More...
llvm::Optional< unsigned > | getCallArgIndex ()
| 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...
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 234 of file TemplateDeduction.h.

## Member Function Documentation

## ◆ Destroy()

void DeductionFailureInfo::Destroy | ( |  | ) |

Free any memory associated with this deduction failure.

Definition at line 690 of file SemaOverload.cpp.

References Diag(), clang::Sema::TDK_ConstraintsNotSatisfied, clang::Sema::TDK_CUDATargetMismatch, clang::Sema::TDK_DeducedMismatch, clang::Sema::TDK_DeducedMismatchNested, clang::Sema::TDK_Incomplete, clang::Sema::TDK_IncompletePack, clang::Sema::TDK_Inconsistent, clang::Sema::TDK_InstantiationDepth, clang::Sema::TDK_Invalid, clang::Sema::TDK_InvalidExplicitArguments, clang::Sema::TDK_MiscellaneousDeductionFailure, clang::Sema::TDK_NonDeducedMismatch, clang::Sema::TDK_NonDependentConversionFailure, clang::Sema::TDK_SubstitutionFailure, clang::Sema::TDK_Success, clang::Sema::TDK_TooFewArguments, clang::Sema::TDK_TooManyArguments, and clang::Sema::TDK_Underqualified.

## ◆ getCallArgIndex()

llvm::Optional< unsigned > DeductionFailureInfo::getCallArgIndex | ( |  | ) |

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

Definition at line 873 of file SemaOverload.cpp.

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

## ◆ getFirstArg()

const TemplateArgument * DeductionFailureInfo::getFirstArg | ( |  | ) |

Return the first template argument this deduction failure refers to, if any.

Definition at line 811 of file SemaOverload.cpp.

References clang::Sema::TDK_ConstraintsNotSatisfied, clang::Sema::TDK_CUDATargetMismatch, clang::Sema::TDK_DeducedMismatch, clang::Sema::TDK_DeducedMismatchNested, clang::Sema::TDK_Incomplete, clang::Sema::TDK_IncompletePack, clang::Sema::TDK_Inconsistent, clang::Sema::TDK_InstantiationDepth, clang::Sema::TDK_Invalid, clang::Sema::TDK_InvalidExplicitArguments, clang::Sema::TDK_MiscellaneousDeductionFailure, clang::Sema::TDK_NonDeducedMismatch, clang::Sema::TDK_NonDependentConversionFailure, clang::Sema::TDK_SubstitutionFailure, clang::Sema::TDK_Success, clang::Sema::TDK_TooFewArguments, clang::Sema::TDK_TooManyArguments, and clang::Sema::TDK_Underqualified.

## ◆ getSecondArg()

const TemplateArgument * DeductionFailureInfo::getSecondArg | ( |  | ) |

Return the second template argument this deduction failure refers to, if any.

Definition at line 842 of file SemaOverload.cpp.

References clang::Sema::TDK_ConstraintsNotSatisfied, clang::Sema::TDK_CUDATargetMismatch, clang::Sema::TDK_DeducedMismatch, clang::Sema::TDK_DeducedMismatchNested, clang::Sema::TDK_Incomplete, clang::Sema::TDK_IncompletePack, clang::Sema::TDK_Inconsistent, clang::Sema::TDK_InstantiationDepth, clang::Sema::TDK_Invalid, clang::Sema::TDK_InvalidExplicitArguments, clang::Sema::TDK_MiscellaneousDeductionFailure, clang::Sema::TDK_NonDeducedMismatch, clang::Sema::TDK_NonDependentConversionFailure, clang::Sema::TDK_SubstitutionFailure, clang::Sema::TDK_Success, clang::Sema::TDK_TooFewArguments, clang::Sema::TDK_TooManyArguments, and clang::Sema::TDK_Underqualified.

## ◆ getSFINAEDiagnostic()

PartialDiagnosticAt * DeductionFailureInfo::getSFINAEDiagnostic | ( |  | ) |

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

Definition at line 737 of file SemaOverload.cpp.

## ◆ getTemplateArgumentList()

TemplateArgumentList * DeductionFailureInfo::getTemplateArgumentList | ( |  | ) |

Retrieve the template argument list associated with this deduction failure, if any.

Definition at line 776 of file SemaOverload.cpp.

References clang::Sema::TDK_ConstraintsNotSatisfied, clang::Sema::TDK_CUDATargetMismatch, clang::Sema::TDK_DeducedMismatch, clang::Sema::TDK_DeducedMismatchNested, clang::Sema::TDK_Incomplete, clang::Sema::TDK_IncompletePack, clang::Sema::TDK_Inconsistent, clang::Sema::TDK_InstantiationDepth, clang::Sema::TDK_Invalid, clang::Sema::TDK_InvalidExplicitArguments, clang::Sema::TDK_MiscellaneousDeductionFailure, clang::Sema::TDK_NonDeducedMismatch, clang::Sema::TDK_NonDependentConversionFailure, clang::Sema::TDK_SubstitutionFailure, clang::Sema::TDK_Success, clang::Sema::TDK_TooFewArguments, clang::Sema::TDK_TooManyArguments, and clang::Sema::TDK_Underqualified.

## ◆ getTemplateParameter()

TemplateParameter DeductionFailureInfo::getTemplateParameter | ( |  | ) |

Retrieve the template parameter this deduction failure refers to, if any.

Definition at line 743 of file SemaOverload.cpp.

References clang::Sema::TDK_ConstraintsNotSatisfied, clang::Sema::TDK_CUDATargetMismatch, clang::Sema::TDK_DeducedMismatch, clang::Sema::TDK_DeducedMismatchNested, clang::Sema::TDK_Incomplete, clang::Sema::TDK_IncompletePack, clang::Sema::TDK_Inconsistent, clang::Sema::TDK_InstantiationDepth, clang::Sema::TDK_Invalid, clang::Sema::TDK_InvalidExplicitArguments, clang::Sema::TDK_MiscellaneousDeductionFailure, clang::Sema::TDK_NonDeducedMismatch, clang::Sema::TDK_NonDependentConversionFailure, clang::Sema::TDK_SubstitutionFailure, clang::Sema::TDK_Success, clang::Sema::TDK_TooFewArguments, clang::Sema::TDK_TooManyArguments, and clang::Sema::TDK_Underqualified.

## Member Data Documentation

## ◆ Data

void* clang::DeductionFailureInfo::Data

Opaque pointer containing additional data about this deduction failure.

Definition at line 243 of file TemplateDeduction.h.

## ◆ Diagnostic

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

A diagnostic indicating why deduction failed.

Definition at line 246 of file TemplateDeduction.h.

## ◆ HasDiagnostic

unsigned clang::DeductionFailureInfo::HasDiagnostic

Indicates whether a diagnostic is stored in Diagnostic.

Definition at line 239 of file TemplateDeduction.h.

## ◆ Result

unsigned clang::DeductionFailureInfo::Result

A Sema::TemplateDeductionResult.

Definition at line 236 of file TemplateDeduction.h.

Referenced by RankDeductionFailure().

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

- include/clang/Sema/TemplateDeduction.h
- lib/Sema/SemaOverload.cpp