clang 19.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
clang::concepts::TypeRequirement Class Reference

A requires-expression requirement which queries the existence of a type name or type template specialization ('type' requirements). More...

#include "clang/AST/ExprConcepts.h"

Inheritance diagram for clang::concepts::TypeRequirement:
Inheritance graph
[legend]

Public Types

enum  SatisfactionStatus { SS_Dependent , SS_SubstitutionFailure , SS_Satisfied }
 
- Public Types inherited from clang::concepts::Requirement
enum  RequirementKind { RK_Type , RK_Simple , RK_Compound , RK_Nested }
 

Public Member Functions

 TypeRequirement (TypeSourceInfo *T)
 Construct a type requirement from a type.
 
 TypeRequirement (SubstitutionDiagnostic *Diagnostic)
 Construct a type requirement when the nested name specifier is invalid due to a bad substitution.
 
SatisfactionStatus getSatisfactionStatus () const
 
void setSatisfactionStatus (SatisfactionStatus Status)
 
bool isSubstitutionFailure () const
 
SubstitutionDiagnosticgetSubstitutionDiagnostic () const
 
TypeSourceInfogetType () const
 
- Public Member Functions inherited from clang::concepts::Requirement
 Requirement (RequirementKind Kind, bool IsDependent, bool ContainsUnexpandedParameterPack, bool IsSatisfied=true)
 
RequirementKind getKind () const
 
bool isSatisfied () const
 
void setSatisfied (bool IsSatisfied)
 
void setDependent (bool IsDependent)
 
bool isDependent () const
 
void setContainsUnexpandedParameterPack (bool Contains)
 
bool containsUnexpandedParameterPack () const
 

Static Public Member Functions

static bool classof (const Requirement *R)
 

Public Attributes

friend ASTStmtReader
 
friend ASTStmtWriter
 

Detailed Description

A requires-expression requirement which queries the existence of a type name or type template specialization ('type' requirements).

Definition at line 225 of file ExprConcepts.h.

Member Enumeration Documentation

◆ SatisfactionStatus

Enumerator
SS_Dependent 
SS_SubstitutionFailure 
SS_Satisfied 

Definition at line 227 of file ExprConcepts.h.

Constructor & Destructor Documentation

◆ TypeRequirement() [1/2]

concepts::TypeRequirement::TypeRequirement ( TypeSourceInfo T)

Construct a type requirement from a type.

If the given type is not dependent, this indicates that the type exists and the requirement will be satisfied. Otherwise, the SubstitutionDiagnostic constructor is to be used.

Definition at line 1672 of file SemaConcept.cpp.

◆ TypeRequirement() [2/2]

clang::concepts::TypeRequirement::TypeRequirement ( SubstitutionDiagnostic Diagnostic)
inline

Construct a type requirement when the nested name specifier is invalid due to a bad substitution.

The requirement is unsatisfied.

Definition at line 247 of file ExprConcepts.h.

Member Function Documentation

◆ classof()

static bool clang::concepts::TypeRequirement::classof ( const Requirement R)
inlinestatic

◆ getSatisfactionStatus()

SatisfactionStatus clang::concepts::TypeRequirement::getSatisfactionStatus ( ) const
inline

Definition at line 251 of file ExprConcepts.h.

Referenced by diagnoseUnsatisfiedRequirement().

◆ getSubstitutionDiagnostic()

SubstitutionDiagnostic * clang::concepts::TypeRequirement::getSubstitutionDiagnostic ( ) const
inline

◆ getType()

TypeSourceInfo * clang::concepts::TypeRequirement::getType ( ) const
inline

◆ isSubstitutionFailure()

bool clang::concepts::TypeRequirement::isSubstitutionFailure ( ) const
inline

◆ setSatisfactionStatus()

void clang::concepts::TypeRequirement::setSatisfactionStatus ( SatisfactionStatus  Status)
inline

Definition at line 252 of file ExprConcepts.h.

Member Data Documentation

◆ ASTStmtReader

friend clang::concepts::TypeRequirement::ASTStmtReader

Definition at line 236 of file ExprConcepts.h.

◆ ASTStmtWriter

friend clang::concepts::TypeRequirement::ASTStmtWriter

Definition at line 237 of file ExprConcepts.h.


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