]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: rename IS_SAME_AS trait code to IS_SAME
authorPatrick Palka <ppalka@redhat.com>
Mon, 3 Oct 2022 15:20:32 +0000 (11:20 -0400)
committerPatrick Palka <ppalka@redhat.com>
Mon, 3 Oct 2022 15:20:32 +0000 (11:20 -0400)
... to match the trait's canonical spelling __is_same instead
of its alternative spelling __is_same_as.

gcc/c-family/ChangeLog:

* c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
RID_IS_SAME_AS.

gcc/cp/ChangeLog:

* constraint.cc (diagnose_trait_expr): Use CPTK_IS_SAME instead
of CPTK_IS_SAME_AS.
* cp-trait.def (IS_SAME_AS): Rename to ...
(IS_SAME): ... this.
* pt.cc (alias_ctad_tweaks): Use CPTK_IS_SAME instead of
CPTK_IS_SAME_AS.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.

gcc/c-family/c-common.cc
gcc/cp/constraint.cc
gcc/cp/cp-trait.def
gcc/cp/pt.cc
gcc/cp/semantics.cc

index 3c60a89bfe2c8c042c4aff448a09761533f55a41..4f9878d269501f4b9a72624d93732c6b50b7aec4 100644 (file)
@@ -509,7 +509,7 @@ const struct c_common_resword c_common_reswords[] =
 #include "cp/cp-trait.def"
 #undef DEFTRAIT
   /* An alias for __is_same.  */
-  { "__is_same_as",    RID_IS_SAME_AS, D_CXXONLY },
+  { "__is_same_as",    RID_IS_SAME,    D_CXXONLY },
 
   /* C++ transactional memory.  */
   { "synchronized",    RID_SYNCHRONIZED, D_CXX_OBJC | D_TRANSMEM },
index f4145571d92d4a04ad8000af94e1595108302499..74898ca1a23fa48421dcb858228414483f9db2d0 100644 (file)
@@ -3649,7 +3649,7 @@ diagnose_trait_expr (tree expr, tree args)
     case CPTK_IS_POLYMORPHIC:
       inform (loc, "  %qT is not a polymorphic type", t1);
       break;
-    case CPTK_IS_SAME_AS:
+    case CPTK_IS_SAME:
       inform (loc, "  %qT is not the same as %qT", t1, t2);
       break;
     case CPTK_IS_STD_LAYOUT:
index 922348a16591d3a6077973320534fefc85ca7189..823899a26c5d91e0427929ceefdf4e4ef92fd11f 100644 (file)
@@ -75,7 +75,7 @@ DEFTRAIT_EXPR (IS_NOTHROW_CONVERTIBLE, "__is_nothrow_convertible", 2)
 DEFTRAIT_EXPR (IS_POINTER_INTERCONVERTIBLE_BASE_OF, "__is_pointer_interconvertible_base_of", 2)
 DEFTRAIT_EXPR (IS_POD, "__is_pod", 1)
 DEFTRAIT_EXPR (IS_POLYMORPHIC, "__is_polymorphic", 1)
-DEFTRAIT_EXPR (IS_SAME_AS, "__is_same", 2)
+DEFTRAIT_EXPR (IS_SAME, "__is_same", 2)
 DEFTRAIT_EXPR (IS_STD_LAYOUT, "__is_standard_layout", 1)
 DEFTRAIT_EXPR (IS_TRIVIAL, "__is_trivial", 1)
 DEFTRAIT_EXPR (IS_TRIVIALLY_ASSIGNABLE, "__is_trivially_assignable", 2)
index 258f76d6e476f8b0420a3e54ceec93bcf324deca..bce2a7779220f6f8a9199075fb1e7df805998363 100644 (file)
@@ -30029,7 +30029,7 @@ alias_ctad_tweaks (tree tmpl, tree uguides)
              /* FIXME this should mean they don't compare as equivalent.  */
              || dependent_alias_template_spec_p (atype, nt_opaque))
            {
-             tree same = finish_trait_expr (loc, CPTK_IS_SAME_AS, atype, ret);
+             tree same = finish_trait_expr (loc, CPTK_IS_SAME, atype, ret);
              ci = append_constraint (ci, same);
            }
 
index 4fb0675cca96985fe23b262576dd46f5888066e8..5cc5a00149893d764c1fbef0160ce8c78e29a406 100644 (file)
@@ -12007,7 +12007,7 @@ trait_expr_value (cp_trait_kind kind, tree type1, tree type2)
     case CPTK_IS_POLYMORPHIC:
       return CLASS_TYPE_P (type1) && TYPE_POLYMORPHIC_P (type1);
 
-    case CPTK_IS_SAME_AS:
+    case CPTK_IS_SAME:
       return same_type_p (type1, type2);
 
     case CPTK_IS_STD_LAYOUT:
@@ -12193,7 +12193,7 @@ finish_trait_expr (location_t loc, cp_trait_kind kind, tree type1, tree type2)
     case CPTK_IS_CLASS:
     case CPTK_IS_ENUM:
     case CPTK_IS_UNION:
-    case CPTK_IS_SAME_AS:
+    case CPTK_IS_SAME:
       break;
 
     case CPTK_IS_LAYOUT_COMPATIBLE: