https://github.com/eisenwave updated 
https://github.com/llvm/llvm-project/pull/206335

>From b7f8ed714fd1fe753fc17cbf7224cd30943efebf Mon Sep 17 00:00:00 2001
From: Eisenwave <[email protected]>
Date: Sun, 28 Jun 2026 15:57:58 +0200
Subject: [PATCH 1/5] [clang] Document CWG3129 as resolved

---
 clang/www/cxx_dr_status.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html
index ef30b5eefea13..4eaf0c44ab082 100755
--- a/clang/www/cxx_dr_status.html
+++ b/clang/www/cxx_dr_status.html
@@ -21720,7 +21720,7 @@ <h2 id="cxxdr">C++ defect report implementation 
status</h2>
     <td>[<a href="https://wg21.link/lex.fcon";>lex.fcon</a>]</td>
     <td>DR</td>
     <td>Clarify which <I>floating-point-literal</I>s are valid</td>
-    <td class="unknown" align="center">Unknown</td>
+    <td class="full" align="center">Clang 2.7</td>
   </tr>
   <tr id="3130">
     <td><a 
href="https://cplusplus.github.io/CWG/issues/3130.html";>3130</a></td>

>From 33aecf2d4c6d9ffef9bc05eb8b0e58ee4298e9d4 Mon Sep 17 00:00:00 2001
From: Eisenwave <[email protected]>
Date: Sun, 28 Jun 2026 16:55:51 +0200
Subject: [PATCH 2/5] Add test, change minimum version to 3.0

---
 clang/test/CXX/drs/cwg3129.cpp | 20 ++++++++++++++++++++
 clang/www/cxx_dr_status.html   |  2 +-
 2 files changed, 21 insertions(+), 1 deletion(-)
 create mode 100644 clang/test/CXX/drs/cwg3129.cpp

diff --git a/clang/test/CXX/drs/cwg3129.cpp b/clang/test/CXX/drs/cwg3129.cpp
new file mode 100644
index 0000000000000..f4bfe81389741
--- /dev/null
+++ b/clang/test/CXX/drs/cwg3129.cpp
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -std=c++98 %s -pedantic-errors -verify=expected
+// RUN: %clang_cc1 -std=c++11 %s -pedantic-errors -verify=expected
+// RUN: %clang_cc1 -std=c++14 %s -pedantic-errors -verify=expected
+// RUN: %clang_cc1 -std=c++17 %s -pedantic-errors -verify=expected
+// RUN: %clang_cc1 -std=c++20 %s -pedantic-errors -verify=expected
+// RUN: %clang_cc1 -std=c++23 %s -pedantic-errors -verify=expected
+// RUN: %clang_cc1 -std=c++2c %s -pedantic-errors -verify=expected
+
+namespace cwg3129 { // cwg3129: 3.0
+
+float huge_f = 1e10000000000F; // expected-warning {{floating-point constant 
too large}}
+float tiny_f = 1e-1000000000F; // expected-warning {{floating-point constant 
too small}}
+
+double huge_d = 1e10000000000; // expected-warning {{floating-point constant 
too large}}
+double tiny_d = 1e-1000000000; // expected-warning {{floating-point constant 
too small}}
+
+long double huge_ld = 1e10000000000L; // expected-warning {{floating-point 
constant too large}}
+long double tiny_ld = 1e-1000000000L; // expected-warning {{floating-point 
constant too small}}
+
+} // namespace cwg3129
diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html
index 4eaf0c44ab082..9988fcd333e75 100755
--- a/clang/www/cxx_dr_status.html
+++ b/clang/www/cxx_dr_status.html
@@ -21720,7 +21720,7 @@ <h2 id="cxxdr">C++ defect report implementation 
status</h2>
     <td>[<a href="https://wg21.link/lex.fcon";>lex.fcon</a>]</td>
     <td>DR</td>
     <td>Clarify which <I>floating-point-literal</I>s are valid</td>
-    <td class="full" align="center">Clang 2.7</td>
+    <td class="full" align="center">Clang 3.0</td>
   </tr>
   <tr id="3130">
     <td><a 
href="https://cplusplus.github.io/CWG/issues/3130.html";>3130</a></td>

>From a93d5606db76cf884b7fc2af9a757523c20a0498 Mon Sep 17 00:00:00 2001
From: Eisenwave <[email protected]>
Date: Sun, 28 Jun 2026 18:02:42 +0200
Subject: [PATCH 3/5] Move tests into cwg31xx.cpp

---
 clang/test/CXX/drs/cwg3129.cpp | 20 --------------------
 clang/test/CXX/drs/cwg31xx.cpp | 21 +++++++++++++++++++--
 2 files changed, 19 insertions(+), 22 deletions(-)
 delete mode 100644 clang/test/CXX/drs/cwg3129.cpp

diff --git a/clang/test/CXX/drs/cwg3129.cpp b/clang/test/CXX/drs/cwg3129.cpp
deleted file mode 100644
index f4bfe81389741..0000000000000
--- a/clang/test/CXX/drs/cwg3129.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// RUN: %clang_cc1 -std=c++98 %s -pedantic-errors -verify=expected
-// RUN: %clang_cc1 -std=c++11 %s -pedantic-errors -verify=expected
-// RUN: %clang_cc1 -std=c++14 %s -pedantic-errors -verify=expected
-// RUN: %clang_cc1 -std=c++17 %s -pedantic-errors -verify=expected
-// RUN: %clang_cc1 -std=c++20 %s -pedantic-errors -verify=expected
-// RUN: %clang_cc1 -std=c++23 %s -pedantic-errors -verify=expected
-// RUN: %clang_cc1 -std=c++2c %s -pedantic-errors -verify=expected
-
-namespace cwg3129 { // cwg3129: 3.0
-
-float huge_f = 1e10000000000F; // expected-warning {{floating-point constant 
too large}}
-float tiny_f = 1e-1000000000F; // expected-warning {{floating-point constant 
too small}}
-
-double huge_d = 1e10000000000; // expected-warning {{floating-point constant 
too large}}
-double tiny_d = 1e-1000000000; // expected-warning {{floating-point constant 
too small}}
-
-long double huge_ld = 1e10000000000L; // expected-warning {{floating-point 
constant too large}}
-long double tiny_ld = 1e-1000000000L; // expected-warning {{floating-point 
constant too small}}
-
-} // namespace cwg3129
diff --git a/clang/test/CXX/drs/cwg31xx.cpp b/clang/test/CXX/drs/cwg31xx.cpp
index c5d6322009093..8c77b73c0cefe 100644
--- a/clang/test/CXX/drs/cwg31xx.cpp
+++ b/clang/test/CXX/drs/cwg31xx.cpp
@@ -14,8 +14,6 @@
 // RUN: %clang_cc1 -std=c++23 %s -fexceptions -fcxx-exceptions 
-pedantic-errors -fexperimental-new-constant-interpreter -verify-directives 
-verify=expected,since-cxx11,since-cxx14,since-cxx17,since-cxx20
 // RUN: %clang_cc1 -std=c++2c %s -fexceptions -fcxx-exceptions 
-pedantic-errors -fexperimental-new-constant-interpreter -verify-directives 
-verify=expected,since-cxx11,since-cxx14,since-cxx17,since-cxx20
 
-// cxx98-14-no-diagnostics
-
 namespace cwg3106 { // cwg3106: 2.7
 #if __cplusplus >= 201103L
 const char str[9] = R"(\u{1234})";
@@ -29,6 +27,25 @@ static_assert(noexcept(noexcept(f())), "");
 #endif
 } // namespace cwg3128
 
+namespace cwg3129 { // cwg3129: 3.0
+
+float huge_f = 1e10000000000F;
+// expected-warning@-1 {{magnitude of floating-point constant too large for 
type 'float'; maximum is 3.40282347E+38}}
+float tiny_f = 1e-1000000000F;
+// expected-warning@-1 {{magnitude of floating-point constant too small for 
type 'float'; minimum is 1.40129846E-45}}
+
+double huge_d = 1e10000000000;
+// expected-warning@-1 {{magnitude of floating-point constant too large for 
type 'double'; maximum is 1.7976931348623157E+308}}
+double tiny_d = 1e-1000000000;
+// expected-warning@-1 {{magnitude of floating-point constant too small for 
type 'double'; minimum is 4.9406564584124654E-324}}
+
+long double huge_ld = 1e10000000000L;
+// expected-warning@-1 {{magnitude of floating-point constant too large for 
type 'long double'; maximum is 1.18973149535723176502E+4932}}
+long double tiny_ld = 1e-1000000000L;
+// expected-warning@-1 {{magnitude of floating-point constant too small for 
type 'long double'; minimum is 3.64519953188247460253E-4951}}
+
+} // namespace cwg3129
+
 namespace cwg3135 { // cwg3135: 23
 #if __cplusplus >= 201703L
 struct Pinned {

>From d4975649ec02e3651d49f25c49dc41416cd1cc16 Mon Sep 17 00:00:00 2001
From: Eisenwave <[email protected]>
Date: Sun, 28 Jun 2026 19:41:20 +0200
Subject: [PATCH 4/5] Avoid platform-specific warning expectations

---
 clang/test/CXX/drs/cwg31xx.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/clang/test/CXX/drs/cwg31xx.cpp b/clang/test/CXX/drs/cwg31xx.cpp
index 8c77b73c0cefe..3f2665211fd4a 100644
--- a/clang/test/CXX/drs/cwg31xx.cpp
+++ b/clang/test/CXX/drs/cwg31xx.cpp
@@ -30,19 +30,19 @@ static_assert(noexcept(noexcept(f())), "");
 namespace cwg3129 { // cwg3129: 3.0
 
 float huge_f = 1e10000000000F;
-// expected-warning@-1 {{magnitude of floating-point constant too large for 
type 'float'; maximum is 3.40282347E+38}}
+// expected-warning-re@-1 {{{{magnitude of floating-point constant too large 
for type 'float'.*}}}}
 float tiny_f = 1e-1000000000F;
-// expected-warning@-1 {{magnitude of floating-point constant too small for 
type 'float'; minimum is 1.40129846E-45}}
+// expected-warning-re@-1 {{{{magnitude of floating-point constant too small 
for type 'float'.*}}}}
 
 double huge_d = 1e10000000000;
-// expected-warning@-1 {{magnitude of floating-point constant too large for 
type 'double'; maximum is 1.7976931348623157E+308}}
+// expected-warning-re@-1 {{{{magnitude of floating-point constant too large 
for type 'double'.*}}}}
 double tiny_d = 1e-1000000000;
-// expected-warning@-1 {{magnitude of floating-point constant too small for 
type 'double'; minimum is 4.9406564584124654E-324}}
+// expected-warning-re@-1 {{{{magnitude of floating-point constant too small 
for type 'double'.*}}}}
 
 long double huge_ld = 1e10000000000L;
-// expected-warning@-1 {{magnitude of floating-point constant too large for 
type 'long double'; maximum is 1.18973149535723176502E+4932}}
+// expected-warning-re@-1 {{{{magnitude of floating-point constant too large 
for type 'long double'.*}}}}
 long double tiny_ld = 1e-1000000000L;
-// expected-warning@-1 {{magnitude of floating-point constant too small for 
type 'long double'; minimum is 3.64519953188247460253E-4951}}
+// expected-warning-re@-1 {{{{magnitude of floating-point constant too small 
for type 'long double'.*}}}}
 
 } // namespace cwg3129
 

>From d222108275e46c0dc78af4c57f46b89d53ab6f69 Mon Sep 17 00:00:00 2001
From: Eisenwave <[email protected]>
Date: Sun, 28 Jun 2026 21:45:01 +0200
Subject: [PATCH 5/5] Include more text in error message

---
 clang/test/CXX/drs/cwg31xx.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/clang/test/CXX/drs/cwg31xx.cpp b/clang/test/CXX/drs/cwg31xx.cpp
index 3f2665211fd4a..512f3cfa2ca92 100644
--- a/clang/test/CXX/drs/cwg31xx.cpp
+++ b/clang/test/CXX/drs/cwg31xx.cpp
@@ -30,19 +30,19 @@ static_assert(noexcept(noexcept(f())), "");
 namespace cwg3129 { // cwg3129: 3.0
 
 float huge_f = 1e10000000000F;
-// expected-warning-re@-1 {{{{magnitude of floating-point constant too large 
for type 'float'.*}}}}
+// expected-warning-re@-1 {{magnitude of floating-point constant too large for 
type 'float'; maximum is {{.*}}}}
 float tiny_f = 1e-1000000000F;
-// expected-warning-re@-1 {{{{magnitude of floating-point constant too small 
for type 'float'.*}}}}
+// expected-warning-re@-1 {{magnitude of floating-point constant too small for 
type 'float'; minimum is {{.*}}}}
 
 double huge_d = 1e10000000000;
-// expected-warning-re@-1 {{{{magnitude of floating-point constant too large 
for type 'double'.*}}}}
+// expected-warning-re@-1 {{magnitude of floating-point constant too large for 
type 'double'; maximum is {{.*}}}}
 double tiny_d = 1e-1000000000;
-// expected-warning-re@-1 {{{{magnitude of floating-point constant too small 
for type 'double'.*}}}}
+// expected-warning-re@-1 {{magnitude of floating-point constant too small for 
type 'double'; minimum is {{.*}}}}
 
 long double huge_ld = 1e10000000000L;
-// expected-warning-re@-1 {{{{magnitude of floating-point constant too large 
for type 'long double'.*}}}}
+// expected-warning-re@-1 {{magnitude of floating-point constant too large for 
type 'long double'; maximum is {{.*}}}}
 long double tiny_ld = 1e-1000000000L;
-// expected-warning-re@-1 {{{{magnitude of floating-point constant too small 
for type 'long double'.*}}}}
+// expected-warning-re@-1 {{magnitude of floating-point constant too small for 
type 'long double'; minimum is {{.*}}}}
 
 } // namespace cwg3129
 

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to