clang  11.0.0git
Typedefs | Functions
SemaConcept.cpp File Reference
#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/ExprConcepts.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Basic/OperatorPrecedence.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/PointerUnion.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 bool calculateConstraintSatisfaction (Sema &S, const Expr *ConstraintExpr, ConstraintSatisfaction &Satisfaction, AtomicEvaluator &&Evaluator)
 
static bool calculateConstraintSatisfaction (Sema &S, const NamedDecl *Template, ArrayRef< TemplateArgument > TemplateArgs, SourceLocation TemplateNameLoc, MultiLevelTemplateArgumentList &MLTAL, const Expr *ConstraintExpr, ConstraintSatisfaction &Satisfaction)
 
static bool CheckConstraintSatisfaction (Sema &S, const NamedDecl *Template, ArrayRef< const Expr *> ConstraintExprs, ArrayRef< TemplateArgument > TemplateArgs, SourceRange TemplateIDRange, ConstraintSatisfaction &Satisfaction)
 
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, ArrayRef< TemplateArgument > TemplateArgs, const ASTTemplateArgumentListInfo *ArgsAsWritten)
 
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 799 of file SemaConcept.cpp.

Function Documentation

◆ calculateConstraintSatisfaction() [1/2]

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

Definition at line 123 of file SemaConcept.cpp.

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

◆ calculateConstraintSatisfaction() [2/2]

static bool calculateConstraintSatisfaction ( Sema S,
const NamedDecl Template,
ArrayRef< TemplateArgument TemplateArgs,
SourceLocation  TemplateNameLoc,
MultiLevelTemplateArgumentList MLTAL,
const Expr ConstraintExpr,
ConstraintSatisfaction Satisfaction 
)
static

Definition at line 194 of file SemaConcept.cpp.

◆ CheckConstraintSatisfaction()

static bool CheckConstraintSatisfaction ( Sema S,
const NamedDecl Template,
ArrayRef< const Expr *>  ConstraintExprs,
ArrayRef< TemplateArgument TemplateArgs,
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 607 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 398 of file SemaConcept.cpp.

◆ diagnoseUnsatisfiedRequirement() [2/3]

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

Definition at line 462 of file SemaConcept.cpp.

◆ diagnoseUnsatisfiedRequirement() [3/3]

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

Definition at line 489 of file SemaConcept.cpp.

◆ diagnoseWellFormedUnsatisfiedConstraintExpr()

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

Definition at line 510 of file SemaConcept.cpp.

◆ makeCNF()

static NormalForm makeCNF ( const NormalizedConstraint Normalized)
static

◆ makeDNF()

static NormalForm makeDNF ( const NormalizedConstraint Normalized)
static

◆ substituteParameterMappings()

static bool substituteParameterMappings ( Sema S,
NormalizedConstraint N,
ConceptDecl Concept,
ArrayRef< TemplateArgument TemplateArgs,
const ASTTemplateArgumentListInfo ArgsAsWritten 
)
static

Definition at line 663 of file SemaConcept.cpp.

◆ subsumes() [1/2]

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

Definition at line 861 of file SemaConcept.cpp.

Referenced by clang::Sema::IsAtLeastAsConstrained(), and subsumes().

◆ 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