On 12/13/25 3:27 AM, Jakub Jelinek wrote:
On Fri, Dec 12, 2025 at 11:25:57AM -0500, Marek Polacek wrote:@@ -6120,6 +6119,9 @@ cp_parser_splice_specifier (cp_parser *parser, bool template_p = false, return error_mark_node; }+ /* Remember if we are accessing a member of some object. */+ const bool member_access_p = !!parser->context->object_type; + tree expr; { /* Temporarily clear parser->context->object_type. E.g.,I think this isn't even needed, you can then just drop the member_access_p && part of /* For member access splice-specialization-specifier, try to wrap non-dependent splice for function template into a BASELINK so that cp_parser_template_id can handle it. */ if (member_access_p && parser->context->object_type && DECL_FUNCTION_TEMPLATE_P (OVL_FIRST (expr)) && !dependent_type_p (parser->context->object_type)) Because object_type is only temporarily overridden, it will be restored to what it was at the beginning and so can be just tested here.
I still think object_type should be null after cp_parser_splice_specifier like it is after cp_parser_template_name; nothing that comes after the splice is member-qualified.
Jason
