[clang] [clang] Add a new test for CWG2091 (PR #104573)

via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 16 02:35:47 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Vlad Serebrennikov (Endilll)

<details>
<summary>Changes</summary>

This patch adds a test from https://github.com/llvm/llvm-project/issues/42233, and updated CWG2091 status from `2.7` to `10`.

---
Full diff: https://github.com/llvm/llvm-project/pull/104573.diff


2 Files Affected:

- (modified) clang/test/CXX/drs/cwg20xx.cpp (+24-1) 
- (modified) clang/www/cxx_dr_status.html (+1-1) 


``````````diff
diff --git a/clang/test/CXX/drs/cwg20xx.cpp b/clang/test/CXX/drs/cwg20xx.cpp
index cd2f26360d4021..7509d83e3dea63 100644
--- a/clang/test/CXX/drs/cwg20xx.cpp
+++ b/clang/test/CXX/drs/cwg20xx.cpp
@@ -401,11 +401,34 @@ namespace cwg2083 { // cwg2083: partial
 #endif
 }
 
-namespace cwg2091 { // cwg2091: 2.7
+namespace cwg2091 { // cwg2091: 10
 template<int &> struct X;
 template<int &N> void f(X<N>&);
 int n;
 void g(X<n> &x) { f(x); }
+
+namespace GH42233 {
+enum E { I };
+
+class AA { };
+E EV[1] = {I};
+
+template<class ENUM, const ENUM* const VALUES>
+struct S
+{
+	template< class E, const E* const V>
+		friend AA& operator<<( AA& os, const S<E,V>& e );
+};
+
+int f()
+{
+	S< E, EV > x;
+
+	AA a;
+	a << x;
+	return 0;
+}
+} // namespace GH42233
 } // namespace cwg2091 
 
 namespace cwg2094 { // cwg2094: 5
diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html
index c901e1ce0e15b3..23657431233860 100755
--- a/clang/www/cxx_dr_status.html
+++ b/clang/www/cxx_dr_status.html
@@ -12361,7 +12361,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
     <td><a href="https://cplusplus.github.io/CWG/issues/2091.html">2091</a></td>
     <td>CD4</td>
     <td>Deducing reference non-type template arguments</td>
-    <td class="full" align="center">Clang 2.7</td>
+    <td class="full" align="center">Clang 10</td>
   </tr>
   <tr id="2092">
     <td><a href="https://cplusplus.github.io/CWG/issues/2092.html">2092</a></td>

``````````

</details>


https://github.com/llvm/llvm-project/pull/104573


More information about the cfe-commits mailing list