clang 22.0.0git
clang::NormalizedConstraint Struct Reference

A normalized constraint, as defined in C++ [temp.constr.normal], is either an atomic constraint, a conjunction of normalized constraints or a disjunction of normalized constraints. More...

#include "clang/Sema/SemaConcept.h"

Inheritance diagram for clang::NormalizedConstraint:
[legend]

Classes

struct  AtomicConstraintBits
struct  CompoundConstraintBits
struct  ConceptIdBits
struct  FoldExpandedConstraintBits

Public Types

enum class  ConstraintKind : unsigned char { Atomic = 0 , ConceptId , FoldExpanded , Compound }
enum  CompoundConstraintKind : unsigned char { CCK_Conjunction , CCK_Disjunction }
enum class  FoldOperatorKind : unsigned char { And , Or }
using OccurenceList = llvm::SmallBitVector

Public Member Functions

ConstraintKind getKind () const
SourceLocation getBeginLoc () const
SourceLocation getEndLoc () const
SourceRange getSourceRange () const

Protected Types

using ExprOrConcept

Protected Member Functions

 ~NormalizedConstraint ()
 NormalizedConstraint (const Expr *ConstraintExpr, const NamedDecl *ConstraintDecl, UnsignedOrNone PackIndex)
 NormalizedConstraint (const Expr *Pattern, FoldOperatorKind OpKind, NormalizedConstraint *Constraint, const NamedDecl *ConstraintDecl)
 NormalizedConstraint (const ConceptReference *ConceptId, const NamedDecl *ConstraintDecl, NormalizedConstraint *SubConstraint, const ConceptSpecializationExpr *CSE, UnsignedOrNone PackIndex)
 NormalizedConstraint (NormalizedConstraint *LHS, CompoundConstraintKind CCK, NormalizedConstraint *RHS)
bool hasParameterMapping () const
const OccurenceListmappingOccurenceList () const
const OccurenceListmappingOccurenceListForSubsumption () const
llvm::MutableArrayRef< TemplateArgumentLocgetParameterMapping () const
TemplateParameterListgetUsedTemplateParamList () const
void updateParameterMapping (OccurenceList Indexes, OccurenceList IndexesForSubsumption, llvm::MutableArrayRef< TemplateArgumentLoc > Args, TemplateParameterList *ParamList)
bool hasMatchingParameterMapping (ASTContext &C, const NormalizedConstraint &Other) const

Protected Attributes

union { 
   AtomicConstraintBits   Atomic 
   FoldExpandedConstraintBits   FoldExpanded 
   ConceptIdBits   ConceptId 
   CompoundConstraintBits   Compound 
}; 

Friends

class Sema

Detailed Description

A normalized constraint, as defined in C++ [temp.constr.normal], is either an atomic constraint, a conjunction of normalized constraints or a disjunction of normalized constraints.

Definition at line 36 of file SemaConcept.h.

Member Typedef Documentation

◆ ExprOrConcept

Initial value:
llvm::PointerUnion<const Expr *, const ConceptReference *>

Definition at line 54 of file SemaConcept.h.

◆ OccurenceList

using clang::NormalizedConstraint::OccurenceList = llvm::SmallBitVector

Definition at line 51 of file SemaConcept.h.

Member Enumeration Documentation

◆ CompoundConstraintKind

Enumerator
CCK_Conjunction 
CCK_Disjunction 

Definition at line 45 of file SemaConcept.h.

◆ ConstraintKind

Enumerator
Atomic 
ConceptId 
FoldExpanded 
Compound 

Definition at line 38 of file SemaConcept.h.

◆ FoldOperatorKind

Enumerator
And 
Or 

Definition at line 49 of file SemaConcept.h.

Constructor & Destructor Documentation

◆ ~NormalizedConstraint()

clang::NormalizedConstraint::~NormalizedConstraint ( )
inlineprotected

Definition at line 117 of file SemaConcept.h.

References Atomic, Compound, and getKind().

◆ NormalizedConstraint() [1/4]

clang::NormalizedConstraint::NormalizedConstraint ( const Expr * ConstraintExpr,
const NamedDecl * ConstraintDecl,
UnsignedOrNone PackIndex )
inlineprotected

◆ NormalizedConstraint() [2/4]

clang::NormalizedConstraint::NormalizedConstraint ( const Expr * Pattern,
FoldOperatorKind OpKind,
NormalizedConstraint * Constraint,
const NamedDecl * ConstraintDecl )
inlineprotected

Definition at line 135 of file SemaConcept.h.

References FoldExpanded, and NormalizedConstraint().

◆ NormalizedConstraint() [3/4]

clang::NormalizedConstraint::NormalizedConstraint ( const ConceptReference * ConceptId,
const NamedDecl * ConstraintDecl,
NormalizedConstraint * SubConstraint,
const ConceptSpecializationExpr * CSE,
UnsignedOrNone PackIndex )
inlineprotected

◆ NormalizedConstraint() [4/4]

clang::NormalizedConstraint::NormalizedConstraint ( NormalizedConstraint * LHS,
CompoundConstraintKind CCK,
NormalizedConstraint * RHS )
inlineprotected

Definition at line 163 of file SemaConcept.h.

References Compound, and NormalizedConstraint().

Member Function Documentation

◆ getBeginLoc()

SourceLocation clang::NormalizedConstraint::getBeginLoc ( ) const
inline

Definition at line 248 of file SemaConcept.h.

References Atomic, clang::cast(), Compound, ConceptId, FoldExpanded, and getKind().

Referenced by getSourceRange().

◆ getEndLoc()

SourceLocation clang::NormalizedConstraint::getEndLoc ( ) const
inline

Definition at line 263 of file SemaConcept.h.

References Atomic, clang::cast(), Compound, ConceptId, FoldExpanded, and getKind().

Referenced by getSourceRange().

◆ getKind()

ConstraintKind clang::NormalizedConstraint::getKind ( ) const
inline

◆ getParameterMapping()

llvm::MutableArrayRef< TemplateArgumentLoc > clang::NormalizedConstraint::getParameterMapping ( ) const
inlineprotected

Definition at line 184 of file SemaConcept.h.

References Atomic.

Referenced by hasMatchingParameterMapping().

◆ getSourceRange()

SourceRange clang::NormalizedConstraint::getSourceRange ( ) const
inline

Definition at line 277 of file SemaConcept.h.

References getBeginLoc(), and getEndLoc().

◆ getUsedTemplateParamList()

TemplateParameterList * clang::NormalizedConstraint::getUsedTemplateParamList ( ) const
inlineprotected

Definition at line 188 of file SemaConcept.h.

References Atomic.

◆ hasMatchingParameterMapping()

bool clang::NormalizedConstraint::hasMatchingParameterMapping ( ASTContext & C,
const NormalizedConstraint & Other ) const
inlineprotected

◆ hasParameterMapping()

bool clang::NormalizedConstraint::hasParameterMapping ( ) const
inlineprotected

◆ mappingOccurenceList()

const OccurenceList & clang::NormalizedConstraint::mappingOccurenceList ( ) const
inlineprotected

Definition at line 174 of file SemaConcept.h.

References Atomic, and hasParameterMapping().

◆ mappingOccurenceListForSubsumption()

const OccurenceList & clang::NormalizedConstraint::mappingOccurenceListForSubsumption ( ) const
inlineprotected

Definition at line 179 of file SemaConcept.h.

References Atomic, and hasParameterMapping().

Referenced by hasMatchingParameterMapping().

◆ updateParameterMapping()

void clang::NormalizedConstraint::updateParameterMapping ( OccurenceList Indexes,
OccurenceList IndexesForSubsumption,
llvm::MutableArrayRef< TemplateArgumentLoc > Args,
TemplateParameterList * ParamList )
inlineprotected

Definition at line 192 of file SemaConcept.h.

References Atomic, Compound, and getKind().

◆ Sema

friend class Sema
friend

Definition at line 280 of file SemaConcept.h.

References NormalizedConstraint(), and Sema.

Referenced by Sema.

Member Data Documentation

◆ [union]

◆ Atomic

◆ Compound

◆ ConceptId

◆ FoldExpanded


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