Applied.

-- >8 --
Explain why TYPE_DECLs in TYPE_FIELDS go at the end.

gcc/cp/ChangeLog:

        * reflect.cc (class_members_of): Update a comment to mention
        finish_member_declaration.
---
 gcc/cp/reflect.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gcc/cp/reflect.cc b/gcc/cp/reflect.cc
index 9f979b5c0e7..c1173ced168 100644
--- a/gcc/cp/reflect.cc
+++ b/gcc/cp/reflect.cc
@@ -6621,8 +6621,9 @@ class_members_of (location_t loc, const constexpr_ctx 
*ctx, tree r,
                                  get_reflection_raw (loc, m));
        }
     }
-  /* TYPE_DECLs in TYPE_FIELDS come after other decls, so for members_of
-     the declaration order is not preserved.  */
+  /* TYPE_DECLs in TYPE_FIELDS come after other decls due to the "struct
+     stat hack" (see finish_member_declaration), so for members_of the
+     declaration order is not preserved.  */
   if (kind == METAFN_MEMBERS_OF && elts)
     elts->qsort (members_cmp);
   if (kind == METAFN_MEMBERS_OF && !implicitly_declared.is_empty ())

base-commit: 8f9034c840c2ff9063e04ba52520065c90ff56ad
-- 
2.52.0

Reply via email to