[clang] 281b7ee - Update www_status/add test for P1972:

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 28 06:31:10 PDT 2022


Author: Erich Keane
Date: 2022-03-28T06:31:04-07:00
New Revision: 281b7eeb149d236dd4f2c1ab976cce361de4e057

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

LOG: Update www_status/add test for P1972:

This seems to have been implemented/supported correctly back in Clang
10, so update the documentation and add the test from the paper.

Added: 
    clang/test/SemaCXX/cxx20-check-fptr-constraints.cpp

Modified: 
    clang/www/cxx_status.html

Removed: 
    


################################################################################
diff  --git a/clang/test/SemaCXX/cxx20-check-fptr-constraints.cpp b/clang/test/SemaCXX/cxx20-check-fptr-constraints.cpp
new file mode 100644
index 0000000000000..3b93e6fc87858
--- /dev/null
+++ b/clang/test/SemaCXX/cxx20-check-fptr-constraints.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -std=c++20 -verify %s
+
+namespace P1972 {
+void f(int) requires false; // expected-note 4{{because 'false' evaluated to false}} \
+                            // expected-note{{constraints not satisfied}}
+void g() {
+  f(0);                      // expected-error{{no matching function for call to 'f'}}
+  void (*p1)(int) = f;       // expected-error{{invalid reference to function 'f': constraints not satisfied}}
+  void (*p21)(int) = &f;     // expected-error{{invalid reference to function 'f': constraints not satisfied}}
+  decltype(f) *p2 = nullptr; // expected-error{{invalid reference to function 'f': constraints not satisfied}}
+}
+}

diff  --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html
index bd863d0f2fc50..3fcf7a3a27cae 100755
--- a/clang/www/cxx_status.html
+++ b/clang/www/cxx_status.html
@@ -938,7 +938,7 @@ <h2 id="cxx20">C++20 implementation status</h2>
       </tr>
       <tr> <!-- from Belfast -->
         <td><a href="https://wg21.link/p1972r0">P1972R0</a></td>
-        <td rowspan="4" class="none" align="center">No</td>
+        <td rowspan="4" class="full" align="center">Clang 10</td>
       </tr>
       <tr>
         <td><a href="https://wg21.link/p1980r0">P1980R0</a></td>


        


More information about the cfe-commits mailing list