{"id":2221390,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2221390/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/patch/adeQ2JwApvhDJ-Yw@tucnak/","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/1.2/projects/17/?format=json","name":"GNU Compiler Collection","link_name":"gcc","list_id":"gcc-patches.gcc.gnu.org","list_email":"gcc-patches@gcc.gnu.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<adeQ2JwApvhDJ-Yw@tucnak>","list_archive_url":null,"date":"2026-04-09T11:43:20","name":"testsuite: Diagnose non-uglified names even in requires exprs","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"25b5469b9c8e1dffc3a4f3d649daaf8dcbaec01d","submitter":{"id":671,"url":"http://patchwork.ozlabs.org/api/1.2/people/671/?format=json","name":"Jakub Jelinek","email":"jakub@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/gcc/patch/adeQ2JwApvhDJ-Yw@tucnak/mbox/","series":[{"id":499279,"url":"http://patchwork.ozlabs.org/api/1.2/series/499279/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/list/?series=499279","date":"2026-04-09T11:43:20","name":"testsuite: Diagnose non-uglified names even in requires exprs","version":1,"mbox":"http://patchwork.ozlabs.org/series/499279/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2221390/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2221390/checks/","tags":{},"related":[],"headers":{"Return-Path":"<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":["incoming@patchwork.ozlabs.org","gcc-patches@gcc.gnu.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","gcc-patches@gcc.gnu.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=QsrtsCAm;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)","sourceware.org;\n\tdkim=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=QsrtsCAm","sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com","sourceware.org; spf=pass smtp.mailfrom=redhat.com","server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.133.124"],"Received":["from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4frykl2LKvz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 09 Apr 2026 21:43:57 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id D33F54BA2E1B\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  9 Apr 2026 11:43:55 +0000 (GMT)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by sourceware.org (Postfix) with ESMTP id E65864BA2E06\n for <gcc-patches@gcc.gnu.org>; Thu,  9 Apr 2026 11:43:26 +0000 (GMT)","from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-454-aA0ldh4XN7aYPCdGJhpHgw-1; Thu,\n 09 Apr 2026 07:43:25 -0400","from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 62FE319560AD\n for <gcc-patches@gcc.gnu.org>; Thu,  9 Apr 2026 11:43:24 +0000 (UTC)","from tucnak.zalov.cz (unknown [10.44.33.241])\n by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with\n ESMTPS\n id D108718002A6; Thu,  9 Apr 2026 11:43:23 +0000 (UTC)","from tucnak.zalov.cz (localhost [127.0.0.1])\n by tucnak.zalov.cz (8.18.1/8.18.1) with ESMTPS id 639BhKrb698810\n (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);\n Thu, 9 Apr 2026 13:43:20 +0200","(from jakub@localhost)\n by tucnak.zalov.cz (8.18.1/8.18.1/Submit) id 639BhK9W698809;\n Thu, 9 Apr 2026 13:43:20 +0200"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org D33F54BA2E1B","OpenDKIM Filter v2.11.0 sourceware.org E65864BA2E06"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org E65864BA2E06","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org E65864BA2E06","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775735007; cv=none;\n b=NxEHVMSMLKjx70Y/fVWeYoFSvM+xTgqRyil2CzepW1p63NqAhcBp4xH1UadUceehAB34JDomK0cKfM0atreLuximtC1xNOZgCwrLBBB5dm8eshq+2hawHfubfJrMA4KWPg3wVLuJN2nv9IQ1uodUUI6dxK+lz1+dgNu6G1GBqaQ=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775735007; c=relaxed/simple;\n bh=KtS0SPKWWjA6Xzs/7FrDzUgWg/tQe3MYaSUMnVevyzA=;\n h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;\n b=NWczyRY0cnsQ1+GTGMZmx4DVyVHokhk23cNTg0kbj+RVPWEk8bvqb4lXfm/ug2rDmYK0AZkMcq91eiwBy6+areViOqA0DVuCyj3gxiWRjITbuPckKhhNyOlheCP7T5hzILU48/FfH74TCaQ6lHoReQaL0KNxBlh/Eb60k4jNKAc=","ARC-Authentication-Results":"i=1; server2.sourceware.org","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1775735006;\n h=from:from:reply-to:reply-to:subject:subject:date:date:\n message-id:message-id:to:to:cc:cc:mime-version:mime-version:\n content-type:content-type; bh=Yqf9iafWYWYkGpFnsK3Q/y5izd6Z8jNczsr2TS1QJYE=;\n b=QsrtsCAmCWfiDjJfNkHmR6TcTHYjY6KxkfcFWvuhr49DQNJwHfWLm4g0ayORuc+5bCKNyt\n ctYx+0ZMejVLXSe83kD8Fevpqh4uYzqwl8HT6ZluWNzzxa5GlG3leKd3wiB+58/6wku+wl\n raWXMqbFu96Y2nzZXmC6aSbcUb32GWQ=","X-MC-Unique":"aA0ldh4XN7aYPCdGJhpHgw-1","X-Mimecast-MFC-AGG-ID":"aA0ldh4XN7aYPCdGJhpHgw_1775735004","Date":"Thu, 9 Apr 2026 13:43:20 +0200","From":"Jakub Jelinek <jakub@redhat.com>","To":"Jason Merrill <jason@redhat.com>, Jonathan Wakely <jwakely@redhat.com>,\n Patrick Palka <ppalka@redhat.com>","Cc":"gcc-patches@gcc.gnu.org","Subject":"[PATCH] testsuite: Diagnose non-uglified names even in requires exprs","Message-ID":"<adeQ2JwApvhDJ-Yw@tucnak>","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.4.1 on 10.30.177.111","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"Wx4gkUYQ2-izlvwJ0mG3M-mFMsiczaNRSiW6hWvyadc_1775735004","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","X-BeenThere":"gcc-patches@gcc.gnu.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Gcc-patches mailing list <gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>","List-Archive":"<https://gcc.gnu.org/pipermail/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-request@gcc.gnu.org?subject=help>","List-Subscribe":"<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>","Reply-To":"Jakub Jelinek <jakub@redhat.com>","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"},"content":"Hi!\n\nThis is on top of the\nhttps://gcc.gnu.org/pipermail/gcc-patches/2026-March/710969.html\npatch.  I was worried we don't handle lambda parameters/captures,\nbut apparently we do (so I have just added tests to verify that),\nand noticed we don't handle params of requires expressions, so\nadded test coverage for that and handled those in the plugins.\n\nTested on x86_64-linux and i686-linux, ok for trunk?\n\n2026-04-09  Jakub Jelinek  <jakub@redhat.com>\n\n\t* g++.dg/plugin/uglification_plugin.cc (plugin_check_tree): Walk\n\tREQUIRES_EXPR_PARMS of REQUIRES_EXPR.\n\t(plugin_walk_decl): Walk TEMPLATE_PARMS_CONSTRAINTS using\n\tplugin_check_tree.  Walk DECL_INITIAL of CONCEPT_DECL as well.\n\t* g++.dg/plugin/uglification.C: Add tests for non-uglified names\n\tin lambda parameters, lambda captures and requires expressions.\n\n\n\tJakub","diff":"--- gcc/testsuite/g++.dg/plugin/uglification_plugin.cc.jj\t2026-04-09 12:23:44.001071999 +0200\n+++ gcc/testsuite/g++.dg/plugin/uglification_plugin.cc\t2026-04-09 13:31:41.924617700 +0200\n@@ -89,6 +89,9 @@ plugin_check_tree (tree *tp, int */*walk\n       plugin_check_decl (var);\n   if (TREE_CODE (*tp) == DECL_EXPR)\n     plugin_check_decl (DECL_EXPR_DECL (*tp));\n+  if (TREE_CODE (*tp) == REQUIRES_EXPR)\n+    for (tree parm = REQUIRES_EXPR_PARMS (*tp); parm; parm = DECL_CHAIN (parm))\n+      plugin_check_decl (parm);\n   return NULL_TREE;\n }\n \n@@ -153,6 +156,10 @@ plugin_walk_decl (tree decl)\n       tree parms = DECL_INNERMOST_TEMPLATE_PARMS (decl);\n       for (tree node : tree_vec_range (parms))\n \tplugin_check_decl (TREE_VALUE (node));\n+      if (tree constr\n+\t  = TEMPLATE_PARMS_CONSTRAINTS (DECL_TEMPLATE_PARMS (decl)))\n+        cp_walk_tree_without_duplicates (&constr, plugin_check_tree,\n+\t\t\t\t\t NULL);\n     }\n \n   if (DECL_FUNCTION_TEMPLATE_P (decl))\n@@ -162,6 +169,10 @@ plugin_walk_decl (tree decl)\n \t   && DECL_TEMPLATE_INFO (decl))\n     plugin_check_fn (decl);\n \n+  if (TREE_CODE (STRIP_TEMPLATE (decl)) == CONCEPT_DECL)\n+    cp_walk_tree_without_duplicates (&DECL_INITIAL (STRIP_TEMPLATE (decl)),\n+\t\t\t\t     plugin_check_tree, NULL);\n+\n   if (DECL_CLASS_TEMPLATE_P (decl))\n     decl = DECL_TEMPLATE_RESULT (decl);\n   if (TREE_CODE (decl) == TYPE_DECL\n--- gcc/testsuite/g++.dg/plugin/uglification.C.jj\t2026-04-09 12:23:44.001236292 +0200\n+++ gcc/testsuite/g++.dg/plugin/uglification.C\t2026-04-09 12:56:06.267164891 +0200\n@@ -148,4 +148,16 @@ namespace std {\n       return ao;\n     }\n   };\n+  void sed (int __ap) {\n+    auto __aq = [] (int ar) {};\t\t// { dg-message \"note: non-uglified name 'ar'\" }\n+    auto __as = [at = __ap] () {};\t// { dg-message \"note: non-uglified name 'at'\" }\n+  }\n+  template <typename _Tp>\n+  concept eiusmod = requires (_Tp au) {\t// { dg-message \"note: non-uglified name 'au'\" }\n+    au++;\n+  };\n+  template <typename ..._Tp>\n+  requires ((requires (const _Tp av) {\t// { dg-message \"note: non-uglified name 'av'\" }\n+    av++; }) && ...)\n+  void tempor (_Tp ...aw) {}\t\t// { dg-message \"note: non-uglified name 'aw'\" }\n }\n","prefixes":[]}