clang 10.0.0git

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
clang::ConstraintSatisfaction Class Reference

The result of a constraint satisfaction check, containing the necessary information to diagnose an unsatisfied constraint. More...

`#include "clang/AST/ASTConcept.h"`

Inheritance diagram for clang::ConstraintSatisfaction:
[legend]
Collaboration diagram for clang::ConstraintSatisfaction:
[legend]

## Public Types
using | SubstitutionDiagnostic = std::pair< SourceLocation, StringRef >
using | Detail = llvm::PointerUnion< Expr *, SubstitutionDiagnostic * >

## Public Member Functions
| ConstraintSatisfaction ()=default
| ConstraintSatisfaction (const NamedDecl *ConstraintOwner, ArrayRef< TemplateArgument > TemplateArgs)
void | Profile (llvm::FoldingSetNodeID &ID, const ASTContext &C)

## Static Public Member Functions
static void | Profile (llvm::FoldingSetNodeID &ID, const ASTContext &C, const NamedDecl *ConstraintOwner, ArrayRef< TemplateArgument > TemplateArgs)

## Public Attributes
bool | IsSatisfied = false
llvm::SmallVector< std::pair< const Expr *, Detail >, 4 > | Details
| Pairs of unsatisfied atomic constraint expressions along with the substituted constraint expr, if the template arguments could be substituted into them, or a diagnostic if substitution resulted in an invalid expression. More...

## Detailed Description

The result of a constraint satisfaction check, containing the necessary information to diagnose an unsatisfied constraint.

Definition at line 29 of file ASTConcept.h.

## Member Typedef Documentation

## ◆ Detail

using clang::ConstraintSatisfaction::Detail = llvm::PointerUnion<Expr *, SubstitutionDiagnostic *>

Definition at line 45 of file ASTConcept.h.

## ◆ SubstitutionDiagnostic

using clang::ConstraintSatisfaction::SubstitutionDiagnostic = std::pair<SourceLocation, StringRef>

Definition at line 44 of file ASTConcept.h.

## Constructor & Destructor Documentation

## ◆ ConstraintSatisfaction() [1/2]

clang::ConstraintSatisfaction::ConstraintSatisfaction | ( |  | ) |
| default

## ◆ ConstraintSatisfaction() [2/2]

clang::ConstraintSatisfaction::ConstraintSatisfaction | ( | const NamedDecl * | ConstraintOwner,
|  | ArrayRef< TemplateArgument > | TemplateArgs
| ) |  |
| inline

Definition at line 39 of file ASTConcept.h.

## Member Function Documentation

## ◆ Profile() [1/2]

void clang::ConstraintSatisfaction::Profile | ( | llvm::FoldingSetNodeID & | ID,
|  | const ASTContext & | C
| ) |  |
| inline

Definition at line 55 of file ASTConcept.h.

References clang::C.

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

## ◆ Profile() [2/2]

void ConstraintSatisfaction::Profile | ( | llvm::FoldingSetNodeID & | ID,
|  | const ASTContext & | C,
|  | const NamedDecl * | ConstraintOwner,
|  | ArrayRef< TemplateArgument > | TemplateArgs
| ) |  |
| static

Definition at line 61 of file ASTConcept.cpp.

## Member Data Documentation

## ◆ Details

llvm::SmallVector<std::pair<const Expr *, Detail>, 4> clang::ConstraintSatisfaction::Details

Pairs of unsatisfied atomic constraint expressions along with the substituted constraint expr, if the template arguments could be substituted into them, or a diagnostic if substitution resulted in an invalid expression.

Definition at line 53 of file ASTConcept.h.

Referenced by clang::ASTConstraintSatisfaction::ASTConstraintSatisfaction(), clang::ASTConstraintSatisfaction::Create(), clang::Sema::DiagnoseUnsatisfiedConstraint(), and readConstraintSatisfaction().

## ◆ IsSatisfied

bool clang::ConstraintSatisfaction::IsSatisfied = false

Definition at line 47 of file ASTConcept.h.

Referenced by clang::Sema::CheckConstraintSatisfaction(), CheckDeducedArgumentConstraints(), CheckDeducedPlaceholderConstraints(), clang::Sema::CheckInstantiatedFunctionTemplateConstraints(), clang::Sema::DiagnoseUnsatisfiedConstraint(), clang::Sema::DiagnoseUseOfDecl(), clang::Sema::EnsureTemplateArgumentListConstraints(), and readConstraintSatisfaction().

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

- include/clang/AST/ASTConcept.h
- lib/AST/ASTConcept.cpp