Skip to content

Commit 463e61a

Browse files
committed
[clang][NFC] Add end namespace comments to C++ DR tests
1 parent 2dcb3b9 commit 463e61a

36 files changed

+669
-682
lines changed

clang/test/CXX/drs/cwg0xx.cpp

+78-78
Large diffs are not rendered by default.

clang/test/CXX/drs/cwg10xx.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace std {
1313
const T *p; size_t n;
1414
initializer_list(const T *p, size_t n);
1515
};
16-
}
16+
} // namespace std
1717

1818
namespace cwg1004 { // cwg1004: 5
1919
template<typename> struct A {};
@@ -44,7 +44,7 @@ namespace cwg1004 { // cwg1004: 5
4444
// expected-error@-1 {{is a constructor name}}
4545
// expected-note@#cwg1004-t {{in instantiation of default argument}}
4646
Third<A<int> > t; // #cwg1004-t
47-
}
47+
} // namespace cwg1004
4848

4949
namespace cwg1042 { // cwg1042: 3.5
5050
#if __cplusplus >= 201402L
@@ -59,7 +59,7 @@ namespace cwg1042 { // cwg1042: 3.5
5959
// list in this mode.
6060
using foo [[]] = int;
6161
#endif
62-
}
62+
} // namespace cwg1042
6363

6464
namespace cwg1048 { // cwg1048: 3.6
6565
struct A {};
@@ -77,7 +77,7 @@ namespace cwg1048 { // cwg1048: 3.6
7777
}
7878
} (0);
7979
#endif
80-
}
80+
} // namespace cwg1048
8181

8282
namespace cwg1054 { // cwg1054: no
8383
// FIXME: Test is incomplete.
@@ -90,7 +90,7 @@ namespace cwg1054 { // cwg1054: no
9090
a;
9191
// expected-warning@-1 {{expression result unused; as#to a variable to force a volatile load}}
9292
}
93-
}
93+
} // namespace cwg1054
9494

9595
namespace cwg1070 { // cwg1070: 3.5
9696
#if __cplusplus >= 201103L
@@ -109,4 +109,4 @@ namespace cwg1070 { // cwg1070: 3.5
109109
};
110110
C c = {};
111111
#endif
112-
}
112+
} // namespace cwg1070

clang/test/CXX/drs/cwg11xx.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,6 @@ namespace cwg1113 { // cwg1113: partial
128128
extern "C" void f();
129129
}
130130
void g() { f(); }
131-
}
131+
} // namespace cwg1113
132132

133133
// cwg1150: na

clang/test/CXX/drs/cwg12xx.cpp

+8-10
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ namespace cwg1213 { // cwg1213: 7
3030
using U = decltype(V4Int()[0]);
3131
using U = decltype(EV4Int()[0]);
3232
#endif
33-
}
33+
} // namespace cwg1213
3434

35-
#if __cplusplus >= 201103L
3635
namespace cwg1223 { // cwg1223: 17
36+
#if __cplusplus >= 201103L
3737
struct M;
3838
template <typename T>
3939
struct V;
@@ -83,12 +83,11 @@ void g() {
8383
sizeof(auto () -> C[1]);
8484
// since-cxx11-error@-1 {{function cannot return array type 'C[1]' (aka 'cwg1223::BB[1]')}}
8585
}
86-
87-
}
8886
#endif
87+
} // namespace cwg1223
8988

90-
#if __cplusplus >= 201103L
9189
namespace cwg1227 { // cwg1227: 3.0
90+
#if __cplusplus >= 201103L
9291
template <class T> struct A { using X = typename T::X; };
9392
// since-cxx11-error@-1 {{type 'int' cannot be used prior to '::' because it has no members}}
9493
// since-cxx11-note@#cwg1227-g {{in instantiation of template class 'cwg1227::A<int>' requested here}}
@@ -102,8 +101,8 @@ void h() {
102101
f<int>(0); // OK, substituting return type causes deduction to fail
103102
g<int>(0); // #cwg1227-g-int
104103
}
105-
}
106104
#endif
105+
} // namespace cwg1227
107106

108107
namespace cwg1250 { // cwg1250: 3.9
109108
struct Incomplete;
@@ -115,7 +114,7 @@ struct Base {
115114
struct Derived : Base {
116115
virtual Incomplete *meow();
117116
};
118-
}
117+
} // namespace cwg1250
119118

120119
namespace cwg1265 { // cwg1265: 5
121120
#if __cplusplus >= 201103L
@@ -135,7 +134,7 @@ namespace cwg1265 { // cwg1265: 5
135134
auto k(), l();
136135
// since-cxx14-error@-1 {{function with deduced return type must be the only declaration in its group}}
137136
#endif
138-
}
137+
} // namespace cwg1265
139138

140139
// cwg1291: na
141140

@@ -162,5 +161,4 @@ namespace cwg1295 { // cwg1295: 4
162161
using T = decltype(true ? other : x.bitfield);
163162
using T = unsigned;
164163
#endif
165-
}
166-
164+
} // namespace cwg1295

clang/test/CXX/drs/cwg13xx.cpp

+16-16
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ namespace std {
1414
size_t n;
1515
initializer_list(const T*, size_t);
1616
};
17-
}
17+
} // namespace std
1818

19-
#if __cplusplus >= 201103L
2019
namespace cwg1305 { // cwg1305: 3.0
20+
#if __cplusplus >= 201103L
2121
struct Incomplete; // #cwg1305-Incomplete
2222
struct Complete {};
2323

2424
int incomplete = alignof(Incomplete(&)[]);
2525
// since-cxx11-error@-1 {{invalid application of 'alignof' to an incomplete type 'Incomplete'}}
2626
// since-cxx11-note@#cwg1305-Incomplete {{forward declaration of 'cwg1305::Incomplete'}}
2727
int complete = alignof(Complete(&)[]);
28-
}
2928
#endif
29+
} // namespace cwg1305
3030

3131
namespace cwg1307 { // cwg1307: 14
3232
#if __cplusplus >= 201103L
@@ -150,7 +150,7 @@ namespace cwg1310 { // cwg1310: 5
150150
}
151151
template void wt_test<W<int> >(); // #cwg1310-W-int
152152
template void wt_test_good<W<int> >();
153-
}
153+
} // namespace cwg1310
154154

155155
namespace cwg1315 { // cwg1315: partial
156156
template <int I, int J> struct A {};
@@ -182,7 +182,7 @@ namespace cwg1315 { // cwg1315: partial
182182
template <typename T, int I> struct C;
183183
template <typename T> struct C<T, T::value>;
184184
// expected-error@-1 {{type of specialized non-type template argument depends on a template parameter of the partial specialization}}
185-
}
185+
} // namespace cwg1315
186186

187187
namespace cwg1330 { // cwg1330: 4 c++11
188188
// exception-specifications are parsed in a context where the class is complete.
@@ -302,7 +302,7 @@ namespace cwg1330 { // cwg1330: 4 c++11
302302

303303
struct E : C<int> {}; // #cwg1330-C-int
304304
E e; // #cwg1330-e
305-
}
305+
} // namespace cwg1330
306306

307307
// cwg1334: sup 1719
308308

@@ -333,7 +333,7 @@ struct S {
333333
int z : 1 || new int { 0 };
334334
};
335335
#endif
336-
}
336+
} // namespace cwg1341
337337

338338
namespace cwg1346 { // cwg1346: 3.5
339339
auto a(1);
@@ -376,7 +376,7 @@ namespace cwg1346 { // cwg1346: 3.5
376376
// since-cxx11-error@-2 {{cannot deduce type for lambda capture 'e' from parenthesized initializer list}}
377377
}
378378
#endif
379-
}
379+
} // namespace cwg1346
380380

381381
namespace cwg1347 { // cwg1347: 3.1
382382
auto x = 5, *y = &x;
@@ -390,7 +390,7 @@ namespace cwg1347 { // cwg1347: 3.1
390390
auto (*fp)(int) -> int, i = 0;
391391
// since-cxx11-error@-1 {{declaration with trailing return type must be the only declaration in its group}}
392392
#endif
393-
}
393+
} // namespace cwg1347
394394

395395
namespace cwg1350 { // cwg1350: 3.5
396396
#if __cplusplus >= 201103L
@@ -520,7 +520,7 @@ namespace cwg1358 { // cwg1358: 3.1
520520
// cxx11-20-note@#cwg1358-NonLit {{'NonLit' is not literal because it is not an aggregate and has no constexpr constructors other than copy or move constructors}}
521521
};
522522
#endif
523-
}
523+
} // namespace cwg1358
524524

525525
namespace cwg1359 { // cwg1359: 3.5
526526
#if __cplusplus >= 201103L
@@ -549,7 +549,7 @@ namespace cwg1359 { // cwg1359: 3.5
549549
// cxx11-17-note@#cwg1359-Y {{candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were provided}}
550550
// cxx11-17-note@#cwg1359-Y {{candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 0 were provided}}
551551
#endif
552-
}
552+
} // namespace cwg1359
553553

554554
namespace cwg1388 { // cwg1388: 4
555555
template<typename A, typename ...T> void f(T..., A); // #cwg1388-f
@@ -622,7 +622,7 @@ namespace cwg1388 { // cwg1388: 4
622622
// expected-error@-1 {{no matching function for call to 'f_pair_4'}}
623623
// expected-note@#cwg1388-f-4 {{candidate template ignored: deduced packs of different lengths for parameter 'T' (<int, long> vs. <int, long, const char *>)}}
624624
}
625-
}
625+
} // namespace cwg1388
626626

627627
namespace cwg1391 { // cwg1391: partial
628628
struct A {}; struct B : A {};
@@ -713,14 +713,14 @@ namespace cwg1391 { // cwg1391: partial
713713
int test_c1 = c(0); // ok
714714
int test_c2 = c<int>(0); // FIXME: apparently ambiguous
715715
}
716-
}
716+
} // namespace cwg1391
717717

718718
namespace cwg1394 { // cwg1394: 15
719719
#if __cplusplus >= 201103L
720720
struct Incomplete;
721721
Incomplete f(Incomplete) = delete; // well-formed
722722
#endif
723-
}
723+
} // namespace cwg1394
724724

725725
namespace cwg1395 { // cwg1395: 16
726726
#if __cplusplus >= 201103L
@@ -731,7 +731,7 @@ namespace cwg1395 { // cwg1395: 16
731731
f(&i);
732732
}
733733
#endif
734-
}
734+
} // namespace cwg1395
735735

736736
namespace cwg1397 { // cwg1397: 3.2
737737
#if __cplusplus >= 201103L
@@ -757,4 +757,4 @@ namespace cwg1399 { // cwg1399: dup 1388
757757
// expected-error@-1 {{no matching function for call to 'f'}}
758758
// expected-note@#cwg1399-f {{candidate template ignored: deduced packs of different lengths for parameter 'T' (<> vs. <int, int>)}}
759759
}
760-
}
760+
} // namespace cwg1399

clang/test/CXX/drs/cwg14xx.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ namespace cwg1413 { // cwg1413: 12
4040
// expected-note@#cwg1413-var2 {{'var2' declared here}}
4141
}
4242
};
43-
}
43+
} // namespace cwg1413
4444

4545
namespace cwg1423 { // cwg1423: 11
4646
#if __cplusplus >= 201103L
@@ -53,7 +53,7 @@ namespace cwg1423 { // cwg1423: 11
5353
bool b4{nullptr};
5454
// since-cxx11-warning@-1 {{implicit conversion of nullptr constant to 'bool'}}
5555
#endif
56-
}
56+
} // namespace 1423
5757

5858
// cwg1425: na abi
5959

@@ -76,15 +76,15 @@ namespace cwg1432 { // cwg1432: 16
7676

7777
template struct common_type<int, double>;
7878
#endif
79-
}
79+
} // namespace cwg1432
8080

8181
namespace cwg1443 { // cwg1443: yes
8282
struct A {
8383
int i;
8484
A() { void foo(int=i); }
8585
// expected-error@-1 {{default argument references 'this'}}
8686
};
87-
}
87+
} // namespace cwg1443
8888

8989
namespace cwg1458 { // cwg1458: 3.1
9090
#if __cplusplus >= 201103L
@@ -357,7 +357,7 @@ namespace cwg1460 { // cwg1460: 3.5
357357
static_assert(d.a == 0, "");
358358
}
359359
#endif
360-
}
360+
} // namespace cwg1460
361361

362362
#if __cplusplus >= 201103L
363363
namespace std {
@@ -388,7 +388,7 @@ namespace std {
388388
const _E* begin() const {return __begin_;}
389389
const _E* end() const {return __begin_ + __size_;}
390390
};
391-
} // std
391+
} // namespace std
392392
#endif
393393

394394
namespace cwg1467 { // cwg1467: 3.7 c++11
@@ -601,7 +601,7 @@ namespace cwg1467 { // cwg1467: 3.7 c++11
601601
}
602602
} // namespace StringLiterals
603603
#endif
604-
} // cwg1467
604+
} // namespace cwg1467
605605

606606
namespace cwg1477 { // cwg1477: 2.7
607607
namespace N {
@@ -630,7 +630,7 @@ namespace cwg1479 { // cwg1479: 3.1
630630
int operator""_a(const char*, std::size_t = 0);
631631
// since-cxx11-error@-1 {{literal operator cannot have a default argument}}
632632
#endif
633-
}
633+
} // namespace cwg1479
634634

635635
namespace cwg1482 { // cwg1482: 3.0
636636
// NB: sup 2516, test reused there
@@ -675,7 +675,7 @@ namespace cwg1490 { // cwg1490: 3.7 c++11
675675
std::initializer_list<char>{"abc"};
676676
// since-cxx11-error@-1 {{expected unqualified-id}}}
677677
#endif
678-
} // cwg1490
678+
} // namespace cwg1490
679679

680680
namespace cwg1495 { // cwg1495: 4
681681
#if __cplusplus >= 201103L
@@ -717,7 +717,7 @@ namespace cwg1495 { // cwg1495: 4
717717
// since-cxx14-note@#cwg1495-c {{template is declared here}}
718718
#endif
719719
#endif
720-
}
720+
} // namespace cwg1495
721721

722722
namespace cwg1496 { // cwg1496: no
723723
#if __cplusplus >= 201103L
@@ -728,4 +728,4 @@ struct A {
728728
// default constructor which is not deleted.
729729
static_assert(__is_trivial(A), "");
730730
#endif
731-
}
731+
} // namespace cwg1496

0 commit comments

Comments
 (0)