aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.def
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/cp-tree.def')
-rw-r--r--gcc/cp/cp-tree.def72
1 files changed, 22 insertions, 50 deletions
diff --git a/gcc/cp/cp-tree.def b/gcc/cp/cp-tree.def
index 4db1d31..845a7e2 100644
--- a/gcc/cp/cp-tree.def
+++ b/gcc/cp/cp-tree.def
@@ -507,6 +507,11 @@ DEFTREECODE (OMP_DEPOBJ, "omp_depobj", tcc_statement, 2)
/* Extensions for Concepts. */
+/* Concept definition. This is not entirely different than a VAR_DECL
+ except that a) it must be a template, and b) doesn't have the wide
+ range of value and linkage options available to variables. */
+DEFTREECODE (CONCEPT_DECL, "concept_decl", tcc_declaration, 0)
+
/* Used to represent information associated with constrained declarations. */
DEFTREECODE (CONSTRAINT_INFO, "constraint_info", tcc_exceptional, 0)
@@ -541,10 +546,24 @@ DEFTREECODE (NESTED_REQ, "nested_req", tcc_expression, 1)
The operands of a constraint can be either types or expressions.
Unlike expressions, constraints do not have a type. */
-/* A predicate constraint evaluates an expression E.
+/* An atomic constraint evaluates an expression E. The operand of the
+ constraint is its parameter mapping. The actual expression is stored
+ in the context.
+
+ ATOMIC_CONSTR_INFO provides source info to support diagnostics.
+ ATOMIC_CONSTR_EXPR has the expression to be evaluated.
+ ATOMIC_CONSTR_PARMS is the parameter mapping for the atomic constraint
+ and is stored in the type field. */
+DEFTREECODE (ATOMIC_CONSTR, "atomic_constr", tcc_expression, 1)
+
+/* The conjunction and disjunction of two constraints, respectively.
+ Operands are accessed using TREE_OPERAND. The third operand provides
+ source info for diagnostics.
- PRED_CONSTR_EXPR has the expression to be evaluated. */
-DEFTREECODE (PRED_CONSTR, "pred_constr", tcc_expression, 1)
+ CONJ_CONSTR_INFO and DISJ_CONSTR_INFO provide access to the source
+ information of constraints, which is stored in the TREE_TYPE. */
+DEFTREECODE (CONJ_CONSTR, "conj_constr", tcc_expression, 2)
+DEFTREECODE (DISJ_CONSTR, "disj_constr", tcc_expression, 2)
/* A check constraint represents the checking of a concept
C. It has two operands: the template defining the concept
@@ -554,53 +573,6 @@ DEFTREECODE (PRED_CONSTR, "pred_constr", tcc_expression, 1)
CHECK_CONSTR_ARGUMENTS are the template arguments */
DEFTREECODE (CHECK_CONSTR, "check_constr", tcc_expression, 2)
-/* An expression constraint determines the validity of a expression E.
-
- EXPR_CONST_EXPR has the expression being validated. */
-DEFTREECODE (EXPR_CONSTR, "expr_constr", tcc_expression, 1)
-
-/* A type constraint determines the validity of a type T. Note that
-
- TYPE_CONST_TYPE has the type being validated */
-DEFTREECODE (TYPE_CONSTR, "type_constr", tcc_expression, 1)
-
-/* An implicit conversion constraint determines if an expression
- E is implicitly convertible to a type T. Note that T may
- be dependent but does not contain any placeholders.
-
- ICONV_CONSTR_EXPR has the expression E.
- ICONV_CONSTR_TYPE has the type T.
- */
-DEFTREECODE (ICONV_CONSTR, "iconv_constr", tcc_expression, 2)
-
-/* An argument deduction constraint determines if the type of an
- expression E can be deduced from a type pattern T. Note that
- T must contain at least one place holder.
-
- DEDUCT_CONSTR_EXPR has the expression E
- DEDUCT_CONSTR_PATTERN has the type pattern T.
- DEDUCT_CONSTR_PLACEHOLDERS has the list of placeholder nodes in T. */
-DEFTREECODE (DEDUCT_CONSTR, "deduct_constr", tcc_expression, 3)
-
-/* An exception constraint determines if, for an expression E,
- noexcept(E) is true.
-
- EXCEPT_CONSTR_EXPR has the expression E. */
-DEFTREECODE (EXCEPT_CONSTR, "except_constr", tcc_expression, 1)
-
-/* A parameterized constraint declares constraint variables, which
- are used in expression, type, and exception constraints.
-
- PARM_CONSTR_PARMS has a TREE_LIST of parameter declarations.
- PARM_CONSTR_OPERAND has the nested constraint. */
-DEFTREECODE (PARM_CONSTR, "parm_constr", tcc_expression, 2)
-
-/* The conjunction and disjunction of two constraints, respectively.
- Operands are accessed using TREE_OPERAND. */
-DEFTREECODE (CONJ_CONSTR, "conj_constr", tcc_expression, 2)
-DEFTREECODE (DISJ_CONSTR, "disj_constr", tcc_expression, 2)
-
-
/*
Local variables:
mode:c