Add extra comment to eval_access_context_current for inherited ctor handling.

This commit is contained in:
Jakub Jelinek
2026-01-07 13:25:27 +01:00
committed by Marek Polacek
parent 91a2ab239d
commit 1cc58bbd7f

View File

@@ -6224,6 +6224,9 @@ eval_access_context_current (location_t loc, const constexpr_ctx *ctx,
push_access_scope. */
if (scope == NULL_TREE && current_function_decl)
scope = current_function_decl_without_access_scope ();
/* [meta.reflection.access.context]/(5.1.2): Otherwise, if an initialization
by an inherited constructor is using I, a point whose immediate scope is
the class scope corresponding to C. */
if (scope && DECL_INHERITED_CTOR (scope))
scope = DECL_CONTEXT (scope);
if (scope == NULL_TREE)