Skip to content

Commit 257707b

Browse files
authored
[Clang][NFC] Add a test for CWG 2913 (#110614)
I marked DR2913 as implemented in 915df1a, but I forgot to add a corresponding test, so running the script would fail thereafter.
1 parent 36235ce commit 257707b

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

clang/test/CXX/drs/cwg29xx.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,26 @@
66
// RUN: %clang_cc1 -std=c++23 -pedantic-errors -verify=expected %s
77
// RUN: %clang_cc1 -std=c++2c -pedantic-errors -verify=expected %s
88

9+
namespace cwg2913 { // cwg2913: 20 tentatively ready 2024-08-16
10+
11+
#if __cplusplus >= 202002L
12+
13+
template<typename T>
14+
struct R {
15+
R(T);
16+
R(T, T);
17+
};
18+
19+
template<typename T>
20+
R(T) -> R<T> requires true;
21+
22+
template<typename T>
23+
R(T, T) requires true -> R<T>; // expected-error {{expected function body after function declarator}}
24+
25+
#endif
26+
27+
} // namespace cwg2913
28+
929
namespace cwg2915 { // cwg2915: 20 tentatively ready 2024-08-16
1030
#if __cplusplus >= 202302L
1131
struct A {

clang/www/cxx_dr_status.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17334,7 +17334,11 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
1733417334
<td><a href="https://cplusplus.github.io/CWG/issues/2913.html">2913</a></td>
1733517335
<td>tentatively ready</td>
1733617336
<td>Grammar for <I>deduction-guide</I> has <I>requires-clause</I> in the wrong position</td>
17337-
<td class="unreleased" align="center">Clang 20</td>
17337+
<td align="center">
17338+
<details>
17339+
<summary>Not resolved</summary>
17340+
Clang 20 implements 2024-08-16 resolution
17341+
</details></td>
1733817342
</tr>
1733917343
<tr class="open" id="2914">
1734017344
<td><a href="https://cplusplus.github.io/CWG/issues/2914.html">2914</a></td>

0 commit comments

Comments
 (0)