Skip to content

Commit c931f87

Browse files
committed
[clang] Stop reporting unresolved issues in cxx_dr_status.html
This patch prevents tests for unresolved issues to report availability (e.g. `no` or `18`) on `cxx_dr_status.html` page. But it still checks whether specified status matches status on the official list, preventing tests going out of date. Because of aforementioned points, availability comment syntax is now simpler for tests for unresolved issues. What was previously written as `// dr2345: 18 drafting` is now simply `// dr2345: drafting`. This has been discussed in a PR for CWG472 test: llvm#67948 (comment)
1 parent a7d7da6 commit c931f87

File tree

9 files changed

+43
-47
lines changed

9 files changed

+43
-47
lines changed

clang/test/CXX/drs/dr12xx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace dr1213 { // dr1213: 7
3232
}
3333

3434
#if __cplusplus >= 201103L
35-
namespace dr1223 { // dr1223: 17 drafting
35+
namespace dr1223 { // dr1223: drafting
3636
struct M;
3737
template <typename T>
3838
struct V;

clang/test/CXX/drs/dr18xx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ namespace dr1881 { // dr1881: 7
331331
static_assert(!__is_standard_layout(D), "");
332332
}
333333

334-
namespace dr1890 { // dr1890: no drafting
334+
namespace dr1890 { // dr1890: drafting
335335
// FIXME: current consensus for CWG2335 is that the examples are well-formed.
336336
namespace ex1 {
337337
#if __cplusplus >= 201402L

clang/test/CXX/drs/dr20xx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ namespace dr2026 { // dr2026: 11
9090
}
9191
}
9292

93-
namespace dr2049 { // dr2049: 18 drafting
93+
namespace dr2049 { // dr2049: drafting
9494
#if __cplusplus >= 202302L
9595
template <int* x = {}> struct X {};
9696
X<> a;

clang/test/CXX/drs/dr2335.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// expected-no-diagnostics
1111
#endif
1212

13-
namespace dr2335 { // dr2335: no drafting
13+
namespace dr2335 { // dr2335: drafting
1414
// FIXME: current consensus is that the examples are well-formed.
1515
#if __cplusplus >= 201402L
1616
namespace ex1 {

clang/test/CXX/drs/dr23xx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void g() {
5757
} //namespace dr2303
5858
#endif
5959

60-
namespace dr2311 { // dr2311: 18 open
60+
namespace dr2311 { // dr2311: open
6161
#if __cplusplus >= 201707L
6262
template<typename T>
6363
void test() {

clang/test/CXX/drs/dr24xx.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void fallthrough(int n) {
4545
#endif
4646
}
4747

48-
namespace dr2450 { // dr2450: 18 review
48+
namespace dr2450 { // dr2450: review
4949
#if __cplusplus >= 202302L
5050
struct S {int a;};
5151
template <S s>
@@ -59,7 +59,7 @@ f<{.a= 0}>();
5959
#endif
6060
}
6161

62-
namespace dr2459 { // dr2459: 18 drafting
62+
namespace dr2459 { // dr2459: drafting
6363
#if __cplusplus >= 202302L
6464
struct A {
6565
constexpr A(float) {}

clang/test/CXX/drs/dr25xx.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ using ::dr2521::operator""_div;
8383

8484

8585
#if __cplusplus >= 202302L
86-
namespace dr2553 { // dr2553: 18 review
86+
namespace dr2553 { // dr2553: review
8787
struct B {
8888
virtual void f(this B&);
8989
// since-cxx23-error@-1 {{an explicit object parameter cannot appear in a virtual function}}
@@ -101,7 +101,7 @@ struct D : B {
101101
#endif
102102

103103
#if __cplusplus >= 202302L
104-
namespace dr2554 { // dr2554: 18 review
104+
namespace dr2554 { // dr2554: review
105105
struct B {
106106
virtual void f(); // #dr2554-g
107107
};
@@ -128,7 +128,7 @@ struct D3 : B {
128128
#endif
129129

130130
#if __cplusplus >= 202302L
131-
namespace dr2561 { // dr2561: 18 review
131+
namespace dr2561 { // dr2561: review
132132
struct C {
133133
constexpr C(auto) { }
134134
};
@@ -143,7 +143,7 @@ void foo() {
143143
#endif
144144

145145

146-
namespace dr2565 { // dr2565: 16 open
146+
namespace dr2565 { // dr2565: open
147147
#if __cplusplus >= 202002L
148148
template<typename T>
149149
concept C = requires (typename T::type x) {

clang/www/cxx_dr_status.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7146,7 +7146,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
71467146
<td><a href="https://cplusplus.github.io/CWG/issues/1223.html">1223</a></td>
71477147
<td>drafting</td>
71487148
<td>Syntactic disambiguation and <I>trailing-return-type</I>s</td>
7149-
<td class="full" align="center">Clang 17</td>
7149+
<td align="center">Not resolved</td>
71507150
</tr>
71517151
<tr id="1224">
71527152
<td><a href="https://cplusplus.github.io/CWG/issues/1224.html">1224</a></td>
@@ -11148,7 +11148,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
1114811148
<td><a href="https://cplusplus.github.io/CWG/issues/1890.html">1890</a></td>
1114911149
<td>drafting</td>
1115011150
<td>Member type depending on definition of member function</td>
11151-
<td class="none" align="center">No</td>
11151+
<td align="center">Not resolved</td>
1115211152
</tr>
1115311153
<tr id="1891">
1115411154
<td><a href="https://cplusplus.github.io/CWG/issues/1891.html">1891</a></td>
@@ -12102,7 +12102,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
1210212102
<td><a href="https://cplusplus.github.io/CWG/issues/2049.html">2049</a></td>
1210312103
<td>drafting</td>
1210412104
<td>List initializer in non-type template default argument</td>
12105-
<td class="unreleased" align="center">Clang 18</td>
12105+
<td align="center">Not resolved</td>
1210612106
</tr>
1210712107
<tr id="2050">
1210812108
<td><a href="https://cplusplus.github.io/CWG/issues/2050.html">2050</a></td>
@@ -13674,7 +13674,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
1367413674
<td><a href="https://cplusplus.github.io/CWG/issues/2311.html">2311</a></td>
1367513675
<td>open</td>
1367613676
<td>Missed case for guaranteed copy elision</td>
13677-
<td class="unreleased" align="center">Clang 18</td>
13677+
<td align="center">Not resolved</td>
1367813678
</tr>
1367913679
<tr id="2312">
1368013680
<td><a href="https://cplusplus.github.io/CWG/issues/2312.html">2312</a></td>
@@ -13818,7 +13818,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
1381813818
<td><a href="https://cplusplus.github.io/CWG/issues/2335.html">2335</a></td>
1381913819
<td>drafting</td>
1382013820
<td>Deduced return types vs member types</td>
13821-
<td class="none" align="center">No</td>
13821+
<td align="center">Not resolved</td>
1382213822
</tr>
1382313823
<tr id="2336">
1382413824
<td><a href="https://cplusplus.github.io/CWG/issues/2336.html">2336</a></td>
@@ -14508,7 +14508,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
1450814508
<td><a href="https://cplusplus.github.io/CWG/issues/2450.html">2450</a></td>
1450914509
<td>review</td>
1451014510
<td><I>braced-init-list</I> as a <I>template-argument</I></td>
14511-
<td class="unreleased" align="center">Clang 18</td>
14511+
<td align="center">Not resolved</td>
1451214512
</tr>
1451314513
<tr id="2451">
1451414514
<td><a href="https://cplusplus.github.io/CWG/issues/2451.html">2451</a></td>
@@ -14562,7 +14562,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
1456214562
<td><a href="https://cplusplus.github.io/CWG/issues/2459.html">2459</a></td>
1456314563
<td>drafting</td>
1456414564
<td>Template parameter initialization</td>
14565-
<td class="unreleased" align="center">Clang 18</td>
14565+
<td align="center">Not resolved</td>
1456614566
</tr>
1456714567
<tr id="2460">
1456814568
<td><a href="https://cplusplus.github.io/CWG/issues/2460.html">2460</a></td>
@@ -15126,13 +15126,13 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
1512615126
<td><a href="https://cplusplus.github.io/CWG/issues/2553.html">2553</a></td>
1512715127
<td>review</td>
1512815128
<td>Restrictions on explicit object member functions</td>
15129-
<td class="unreleased" align="center">Clang 18</td>
15129+
<td align="center">Not resolved</td>
1513015130
</tr>
1513115131
<tr class="open" id="2554">
1513215132
<td><a href="https://cplusplus.github.io/CWG/issues/2554.html">2554</a></td>
1513315133
<td>review</td>
1513415134
<td>Overriding virtual functions, also with explicit object parameters</td>
15135-
<td class="unreleased" align="center">Clang 18</td>
15135+
<td align="center">Not resolved</td>
1513615136
</tr>
1513715137
<tr class="open" id="2555">
1513815138
<td><a href="https://cplusplus.github.io/CWG/issues/2555.html">2555</a></td>
@@ -15174,7 +15174,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
1517415174
<td><a href="https://cplusplus.github.io/CWG/issues/2561.html">2561</a></td>
1517515175
<td>review</td>
1517615176
<td>Conversion to function pointer for lambda with explicit object parameter</td>
15177-
<td class="unreleased" align="center">Clang 18</td>
15177+
<td align="center">Not resolved</td>
1517815178
</tr>
1517915179
<tr class="open" id="2562">
1518015180
<td><a href="https://cplusplus.github.io/CWG/issues/2562.html">2562</a></td>
@@ -15198,7 +15198,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
1519815198
<td><a href="https://cplusplus.github.io/CWG/issues/2565.html">2565</a></td>
1519915199
<td>open</td>
1520015200
<td>Invalid types in the <I>parameter-declaration-clause</I> of a <I>requires-expression</I></td>
15201-
<td class="full" align="center">Clang 16</td>
15201+
<td align="center">Not resolved</td>
1520215202
</tr>
1520315203
<tr class="open" id="2566">
1520415204
<td><a href="https://cplusplus.github.io/CWG/issues/2566.html">2566</a></td>

clang/www/make_cxx_dr_status

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -132,17 +132,6 @@ latest_release = 17
132132
def availability(issue):
133133
status = status_map.get(issue, 'unknown')
134134

135-
unresolved_status = ''
136-
if status.endswith(' open'):
137-
status = status[:-5]
138-
unresolved_status = 'open'
139-
elif status.endswith(' drafting'):
140-
status = status[:-9]
141-
unresolved_status = 'drafting'
142-
elif status.endswith(' review'):
143-
status = status[:-7]
144-
unresolved_status = 'review'
145-
146135
avail_suffix = ''
147136
if status.endswith(' c++11'):
148137
status = status[:-6]
@@ -191,17 +180,26 @@ def availability(issue):
191180
else:
192181
avail = 'Superseded by <a href="#%s">%s</a>' % (dup, dup)
193182
try:
194-
_, avail_style, _ = availability(int(dup))
183+
_, avail_style = availability(int(dup))
195184
except:
196185
print("issue %s marked as sup %s" % (issue, dup), file=sys.stderr)
197186
avail_style = ' class="none"'
198187
elif status.startswith('dup '):
199188
dup = int(status.split(' ', 1)[1])
200189
avail = 'Duplicate of <a href="#%s">%s</a>' % (dup, dup)
201-
_, avail_style, _ = availability(dup)
190+
_, avail_style = availability(dup)
191+
elif status == 'open':
192+
avail = 'open'
193+
avail_style = ''
194+
elif status == 'drafting':
195+
avail = 'drafting'
196+
avail_style = ''
197+
elif status == 'review':
198+
avail = 'review'
199+
avail_style = ''
202200
else:
203201
assert False, 'unknown status %s for issue %s' % (status, dr.issue)
204-
return (avail + avail_suffix, avail_style, unresolved_status)
202+
return (avail + avail_suffix, avail_style)
205203

206204
count = {}
207205
for dr in drs:
@@ -217,20 +215,18 @@ for dr in drs:
217215

218216
elif dr.status in ('open', 'drafting', 'review'):
219217
row_style = ' class="open"'
220-
avail, avail_style, unresolved_status = availability(dr.issue)
221-
if avail == 'Unknown':
222-
avail = 'Not resolved'
223-
avail_style = ''
224-
else:
225-
assert unresolved_status == dr.status, \
226-
"Issue %s is marked '%s', which differs from CWG index status '%s'" \
227-
% (dr.issue, unresolved_status, dr.status)
218+
avail, _ = availability(dr.issue)
219+
assert avail == 'Unknown' or avail == dr.status, \
220+
"Issue %s is marked '%s', which differs from CWG index status '%s'" \
221+
% (dr.issue, avail, dr.status)
222+
avail = 'Not resolved'
223+
avail_style = ''
228224
else:
229225
row_style = ''
230-
avail, avail_style, unresolved_status = availability(dr.issue)
231-
assert not unresolved_status, \
226+
avail, avail_style = availability(dr.issue)
227+
assert avail not in ('open', 'drafting', 'review'), \
232228
"Issue %s is marked '%s', even though it is resolved in CWG index" \
233-
% (dr.issue, unresolved_status)
229+
% (dr.issue, avail)
234230

235231
if not avail.startswith('Sup') and not avail.startswith('Dup'):
236232
count[avail] = count.get(avail, 0) + 1

0 commit comments

Comments
 (0)