[clang] Revert "[clang][NFC] Add a test for CWG2685" (PR #95389)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 13 03:56:05 PDT 2024


https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/95389

I was wrong: The purpose of CWG2685 is to avoid brace elision on string literals and we should be rejecting the case.

Reverts llvm/llvm-project#95206


>From 0e8c9bca863137f14aea2cee0e05d4270b33e0e8 Mon Sep 17 00:00:00 2001
From: Younan Zhang <zyn7109 at gmail.com>
Date: Thu, 13 Jun 2024 18:53:46 +0800
Subject: [PATCH] Revert "[clang][NFC] Add a test for CWG2685 (#95206)"

This reverts commit 3475116e2c37a2c8a69658b36c02871c322da008.
---
 clang/test/CXX/drs/cwg26xx.cpp | 9 ---------
 clang/www/cxx_dr_status.html   | 2 +-
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/clang/test/CXX/drs/cwg26xx.cpp b/clang/test/CXX/drs/cwg26xx.cpp
index fee3ef16850bf..2b17c8101438d 100644
--- a/clang/test/CXX/drs/cwg26xx.cpp
+++ b/clang/test/CXX/drs/cwg26xx.cpp
@@ -225,15 +225,6 @@ void m() {
 }
 
 #if __cplusplus >= 202302L
-
-namespace cwg2685 { // cwg2685: 17
-template <class T>
-struct A {
-  T ar[4];
-};
-A a = { "foo" };
-}
-
 namespace cwg2687 { // cwg2687: 18
 struct S{
     void f(int);
diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html
index 8c79708f23abd..5e2ab06701703 100755
--- a/clang/www/cxx_dr_status.html
+++ b/clang/www/cxx_dr_status.html
@@ -15918,7 +15918,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
     <td><a href="https://cplusplus.github.io/CWG/issues/2685.html">2685</a></td>
     <td>C++23</td>
     <td>Aggregate CTAD, string, and brace elision</td>
-    <td class="full" align="center">Clang 17</td>
+    <td class="unknown" align="center">Unknown</td>
   </tr>
   <tr class="open" id="2686">
     <td><a href="https://cplusplus.github.io/CWG/issues/2686.html">2686</a></td>



More information about the cfe-commits mailing list