13#ifndef LLVM_CLANG_SEMA_SEMACONCEPT_H
14#define LLVM_CLANG_SEMA_SEMACONCEPT_H
20#include "llvm/ADT/PointerUnion.h"
21#include "llvm/ADT/SmallVector.h"
46 llvm::FoldingSetNodeID IDA, IDB;
49 C.getCanonicalTemplateArgument((*Other.ParameterMapping)[I].getArgument())
87 std::pair<NormalizedConstraint, NormalizedConstraint> *, 1,
90 llvm::PointerUnion<AtomicConstraint *, CompoundConstraint>
Constraint;
97 std::move(LHS), std::move(RHS)}, Kind}} { };
100 if (Other.isAtomic()) {
104 new (C) std::pair<NormalizedConstraint, NormalizedConstraint>{
107 Other.getCompoundKind());
111 Constraint(Other.Constraint) {
112 Other.Constraint =
nullptr;
116 if (&Other !=
this) {
124 assert(!isAtomic() &&
"getCompoundKind called on atomic constraint.");
131 assert(!isAtomic() &&
"getLHS called on atomic constraint.");
136 assert(!isAtomic() &&
"getRHS called on atomic constraint.");
142 "getAtomicConstraint called on non-atomic constraint.");
147 static std::optional<NormalizedConstraint>
149 static std::optional<NormalizedConstraint>
This file provides AST data structures related to concepts.
Defines the clang::ASTContext interface.
Defines the C++ template declaration subclasses.
Defines the clang::SourceLocation class and associated facilities.
static const TemplateArgument & getArgument(const TemplateArgument &A)
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
This represents one expression.
This represents a decl that may have a name.
Sema - This implements semantic analysis and AST building for C.
@ C
Languages that the frontend can parse and compile.
bool subsumes(ASTContext &C, const AtomicConstraint &Other) const
AtomicConstraint(Sema &S, const Expr *ConstraintExpr)
std::optional< ArrayRef< TemplateArgumentLoc > > ParameterMapping
bool hasMatchingParameterMapping(ASTContext &C, const AtomicConstraint &Other) const
const Expr * ConstraintExpr
A normalized constraint, as defined in C++ [temp.constr.normal], is either an atomic constraint,...
NormalizedConstraint(ASTContext &C, NormalizedConstraint LHS, NormalizedConstraint RHS, CompoundConstraintKind Kind)
llvm::PointerUnion< AtomicConstraint *, CompoundConstraint > Constraint
AtomicConstraint * getAtomicConstraint() const
NormalizedConstraint(NormalizedConstraint &&Other)
NormalizedConstraint(AtomicConstraint *C)
NormalizedConstraint & operator=(const NormalizedConstraint &Other)=delete
NormalizedConstraint & operator=(NormalizedConstraint &&Other)
CompoundConstraintKind getCompoundKind() const
NormalizedConstraint & getRHS() const
llvm::PointerIntPair< std::pair< NormalizedConstraint, NormalizedConstraint > *, 1, CompoundConstraintKind > CompoundConstraint
NormalizedConstraint & getLHS() const
NormalizedConstraint(ASTContext &C, const NormalizedConstraint &Other)