[clang] e45c0a9 - Reapply "[NFC] Update CXXSTatus to show we implement CWG 2061""

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 3 06:58:51 PST 2023


Author: Erich Keane
Date: 2023-01-03T06:58:45-08:00
New Revision: e45c0a919df3f9a8e5c352878fe9beb61cbc559d

URL: https://github.com/llvm/llvm-project/commit/e45c0a919df3f9a8e5c352878fe9beb61cbc559d
DIFF: https://github.com/llvm/llvm-project/commit/e45c0a919df3f9a8e5c352878fe9beb61cbc559d.diff

LOG: Reapply "[NFC] Update CXXSTatus to show we implement CWG 2061""

This reverts commit a5ae5afa521f75e87f9018d8361aa5a1cadc7a86.

FIx the test that didn't consider the test was running in pre-C++11
mode.

Added: 
    

Modified: 
    clang/test/CXX/drs/dr20xx.cpp
    clang/www/cxx_dr_status.html

Removed: 
    


################################################################################
diff  --git a/clang/test/CXX/drs/dr20xx.cpp b/clang/test/CXX/drs/dr20xx.cpp
index aef14dd222595..c167f41397c19 100644
--- a/clang/test/CXX/drs/dr20xx.cpp
+++ b/clang/test/CXX/drs/dr20xx.cpp
@@ -310,3 +310,31 @@ namespace dr2094 { // dr2094: 5
   static_assert(__is_trivially_assignable(A, const A&), "");
   static_assert(__is_trivially_assignable(B, const B&), "");
 }
+
+namespace dr2061 { // dr2061: yes
+#if __cplusplus >= 201103L
+  namespace A {
+    inline namespace b {
+      namespace C {
+        // 'f' is the example from the DR.  'S' is an example where if we didn't
+        // properly handle the two being the same, we would get an incomplete
+        // type error during attempted instantiation.
+        template<typename T> void f();
+        template<typename T> struct S;
+      }
+    }
+  }
+
+  namespace A {
+    namespace C {
+      template<> void f<int>() { }
+      template<> struct S<int> { };
+    }
+  }
+
+  void use() {
+    A::C::f<int>();
+    A::C::S<int> s;
+  }
+#endif // C++11
+}

diff  --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html
index 11c90cc9e940d..fe609ea08a63d 100755
--- a/clang/www/cxx_dr_status.html
+++ b/clang/www/cxx_dr_status.html
@@ -12173,7 +12173,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
     <td><a href="https://wg21.link/cwg2061">2061</a></td>
     <td>CD4</td>
     <td>Inline namespace after simplifications</td>
-    <td class="none" align="center">Unknown</td>
+    <td class="full" align="center">Yes</td>
   </tr>
   <tr id="2062">
     <td><a href="https://wg21.link/cwg2062">2062</a></td>


        


More information about the cfe-commits mailing list