[clang] [clang] Add test for CWG2091 "Deducing reference non-type template arguments" (PR #100765)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 2 06:49:43 PDT 2024


https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/100765

>From 22b2d8972b06cce2d97abc3f07b62aca52ece67c Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov <serebrennikov.vladislav at gmail.com>
Date: Fri, 26 Jul 2024 18:43:18 +0300
Subject: [PATCH] [clang] Add test for CWG2091 "Deducing reference non-type
 template arguments"

https://cplusplus.github.io/CWG/issues/2091.html
---
 clang/test/CXX/drs/cwg20xx.cpp | 7 +++++++
 clang/www/cxx_dr_status.html   | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/clang/test/CXX/drs/cwg20xx.cpp b/clang/test/CXX/drs/cwg20xx.cpp
index fdd31845d5e0d..cd2f26360d402 100644
--- a/clang/test/CXX/drs/cwg20xx.cpp
+++ b/clang/test/CXX/drs/cwg20xx.cpp
@@ -401,6 +401,13 @@ namespace cwg2083 { // cwg2083: partial
 #endif
 }
 
+namespace cwg2091 { // cwg2091: 2.7
+template<int &> struct X;
+template<int &N> void f(X<N>&);
+int n;
+void g(X<n> &x) { f(x); }
+} // namespace cwg2091 
+
 namespace cwg2094 { // cwg2094: 5
   struct A { int n; };
   struct B { volatile int n; };
diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html
index 937f67981e296..53347234f3c4f 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="unknown" align="center">Unknown</td>
+    <td class="full" align="center">Clang 2.7</td>
   </tr>
   <tr id="2092">
     <td><a href="https://cplusplus.github.io/CWG/issues/2092.html">2092</a></td>



More information about the cfe-commits mailing list