clang  16.0.0git
Typedefs | Functions
SemaConcept.cpp File Reference
#include "TreeTransform.h"
#include "clang/Sema/SemaConcept.h"
#include "clang/Sema/Sema.h"
#include "clang/Sema/SemaInternal.h"
#include "clang/Sema/SemaDiagnostic.h"
#include "clang/Sema/TemplateDeduction.h"
#include "clang/Sema/Template.h"
#include "clang/Sema/Overload.h"
#include "clang/Sema/Initialization.h"
#include "clang/AST/ASTLambda.h"
#include "clang/AST/ExprConcepts.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Basic/OperatorPrecedence.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/StringExtras.h"
Include dependency graph for SemaConcept.cpp:

Go to the source code of this file.

Typedefs

using NormalForm = llvm::SmallVector< llvm::SmallVector< AtomicConstraint *, 2 >, 4 >
 

Functions

template<typename AtomicEvaluator >
static ExprResult calculateConstraintSatisfaction (Sema &S, const Expr *ConstraintExpr, ConstraintSatisfaction &Satisfaction, AtomicEvaluator &&Evaluator)
 
static bool DiagRecursiveConstraintEval (Sema &S, llvm::FoldingSetNodeID &ID, const Expr *E, const MultiLevelTemplateArgumentList &MLTAL)
 
static ExprResult calculateConstraintSatisfaction (Sema &S, const NamedDecl *Template, SourceLocation TemplateNameLoc, const MultiLevelTemplateArgumentList &MLTAL, const Expr *ConstraintExpr, ConstraintSatisfaction &Satisfaction)
 
static bool CheckConstraintSatisfaction (Sema &S, const NamedDecl *Template, ArrayRef< const Expr * > ConstraintExprs, llvm::SmallVectorImpl< Expr * > &Converted, const MultiLevelTemplateArgumentList &TemplateArgsLists, SourceRange TemplateIDRange, ConstraintSatisfaction &Satisfaction)
 
static unsigned CalculateTemplateDepthForConstraints (Sema &S, const NamedDecl *ND, bool SkipForSpecialization=false)
 
static void diagnoseUnsatisfiedRequirement (Sema &S, concepts::ExprRequirement *Req, bool First)
 
static void diagnoseUnsatisfiedRequirement (Sema &S, concepts::TypeRequirement *Req, bool First)
 
static void diagnoseUnsatisfiedRequirement (Sema &S, concepts::NestedRequirement *Req, bool First)
 
static void diagnoseWellFormedUnsatisfiedConstraintExpr (Sema &S, Expr *SubstExpr, bool First=true)
 
template<typename SubstitutionDiagnostic >
static void diagnoseUnsatisfiedConstraintExpr (Sema &S, const Expr *E, const llvm::PointerUnion< Expr *, SubstitutionDiagnostic * > &Record, bool First=true)
 
static bool substituteParameterMappings (Sema &S, NormalizedConstraint &N, ConceptDecl *Concept, const MultiLevelTemplateArgumentList &MLTAL, const ASTTemplateArgumentListInfo *ArgsAsWritten)
 
static bool substituteParameterMappings (Sema &S, NormalizedConstraint &N, const ConceptSpecializationExpr *CSE)
 
static NormalForm makeCNF (const NormalizedConstraint &Normalized)
 
static NormalForm makeDNF (const NormalizedConstraint &Normalized)
 
template<typename AtomicSubsumptionEvaluator >
static bool subsumes (NormalForm PDNF, NormalForm QCNF, AtomicSubsumptionEvaluator E)
 
template<typename AtomicSubsumptionEvaluator >
static bool subsumes (Sema &S, NamedDecl *DP, ArrayRef< const Expr * > P, NamedDecl *DQ, ArrayRef< const Expr * > Q, bool &Subsumes, AtomicSubsumptionEvaluator E)
 

Typedef Documentation

◆ NormalForm

Definition at line 1228 of file SemaConcept.cpp.

Function Documentation

◆ calculateConstraintSatisfaction() [1/2]

template<typename AtomicEvaluator >
static ExprResult calculateConstraintSatisfaction ( Sema S,
const Expr ConstraintExpr,
ConstraintSatisfaction Satisfaction,
AtomicEvaluator &&  Evaluator 
)
static

Definition at line 162 of file SemaConcept.cpp.

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

◆ calculateConstraintSatisfaction() [2/2]

static ExprResult calculateConstraintSatisfaction ( Sema S,
const NamedDecl Template,
SourceLocation  TemplateNameLoc,
const MultiLevelTemplateArgumentList MLTAL,
const Expr ConstraintExpr,
ConstraintSatisfaction Satisfaction 
)
static

Definition at line 295 of file SemaConcept.cpp.

◆ CalculateTemplateDepthForConstraints()

static unsigned CalculateTemplateDepthForConstraints ( Sema S,
const NamedDecl ND,
bool  SkipForSpecialization = false 
)
static

◆ CheckConstraintSatisfaction()

static bool CheckConstraintSatisfaction ( Sema S,
const NamedDecl Template,
ArrayRef< const Expr * >  ConstraintExprs,
llvm::SmallVectorImpl< Expr * > &  Converted,
const MultiLevelTemplateArgumentList TemplateArgsLists,
SourceRange  TemplateIDRange,
ConstraintSatisfaction Satisfaction 
)
static

◆ diagnoseUnsatisfiedConstraintExpr()

template<typename SubstitutionDiagnostic >
static void diagnoseUnsatisfiedConstraintExpr ( Sema S,
const Expr E,
const llvm::PointerUnion< Expr *, SubstitutionDiagnostic * > &  Record,
bool  First = true 
)
static

Definition at line 1025 of file SemaConcept.cpp.

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

◆ diagnoseUnsatisfiedRequirement() [1/3]

static void diagnoseUnsatisfiedRequirement ( Sema S,
concepts::ExprRequirement Req,
bool  First 
)
static

Definition at line 810 of file SemaConcept.cpp.

◆ diagnoseUnsatisfiedRequirement() [2/3]

static void diagnoseUnsatisfiedRequirement ( Sema S,
concepts::NestedRequirement Req,
bool  First 
)
static

Definition at line 902 of file SemaConcept.cpp.

◆ diagnoseUnsatisfiedRequirement() [3/3]

static void diagnoseUnsatisfiedRequirement ( Sema S,
concepts::TypeRequirement Req,
bool  First 
)
static

Definition at line 875 of file SemaConcept.cpp.

◆ diagnoseWellFormedUnsatisfiedConstraintExpr()

static void diagnoseWellFormedUnsatisfiedConstraintExpr ( Sema S,
Expr SubstExpr,
bool  First = true 
)
static

Definition at line 923 of file SemaConcept.cpp.

◆ DiagRecursiveConstraintEval()

static bool DiagRecursiveConstraintEval ( Sema S,
llvm::FoldingSetNodeID &  ID,
const Expr E,
const MultiLevelTemplateArgumentList MLTAL 
)
static

Definition at line 273 of file SemaConcept.cpp.

◆ makeCNF()

static NormalForm makeCNF ( const NormalizedConstraint Normalized)
static

◆ makeDNF()

static NormalForm makeDNF ( const NormalizedConstraint Normalized)
static

◆ substituteParameterMappings() [1/2]

static bool substituteParameterMappings ( Sema S,
NormalizedConstraint N,
ConceptDecl Concept,
const MultiLevelTemplateArgumentList MLTAL,
const ASTTemplateArgumentListInfo ArgsAsWritten 
)
static

Definition at line 1082 of file SemaConcept.cpp.

◆ substituteParameterMappings() [2/2]

static bool substituteParameterMappings ( Sema S,
NormalizedConstraint N,
const ConceptSpecializationExpr CSE 
)
static

Definition at line 1137 of file SemaConcept.cpp.

◆ subsumes() [1/2]

template<typename AtomicSubsumptionEvaluator >
static bool subsumes ( NormalForm  PDNF,
NormalForm  QCNF,
AtomicSubsumptionEvaluator  E 
)
static

◆ subsumes() [2/2]

template<typename AtomicSubsumptionEvaluator >
static bool subsumes ( Sema S,
NamedDecl DP,
ArrayRef< const Expr * >  P,
NamedDecl DQ,
ArrayRef< const Expr * >  Q,
bool Subsumes,
AtomicSubsumptionEvaluator  E 
)
static

Definition at line 1322 of file SemaConcept.cpp.