[clang] 463e61a - [clang][NFC] Add end namespace comments to C++ DR tests
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 5 08:49:55 PST 2025
Author: Vlad Serebrennikov
Date: 2025-01-05T19:49:48+03:00
New Revision: 463e61a0013253bec1b5e7f07e7b1803b68e2b3d
URL: https://github.com/llvm/llvm-project/commit/463e61a0013253bec1b5e7f07e7b1803b68e2b3d
DIFF: https://github.com/llvm/llvm-project/commit/463e61a0013253bec1b5e7f07e7b1803b68e2b3d.diff
LOG: [clang][NFC] Add end namespace comments to C++ DR tests
Added:
Modified:
clang/test/CXX/drs/cwg0xx.cpp
clang/test/CXX/drs/cwg10xx.cpp
clang/test/CXX/drs/cwg11xx.cpp
clang/test/CXX/drs/cwg12xx.cpp
clang/test/CXX/drs/cwg13xx.cpp
clang/test/CXX/drs/cwg14xx.cpp
clang/test/CXX/drs/cwg15xx.cpp
clang/test/CXX/drs/cwg16xx.cpp
clang/test/CXX/drs/cwg177x.cpp
clang/test/CXX/drs/cwg17xx.cpp
clang/test/CXX/drs/cwg1807.cpp
clang/test/CXX/drs/cwg18xx.cpp
clang/test/CXX/drs/cwg19xx.cpp
clang/test/CXX/drs/cwg1xx.cpp
clang/test/CXX/drs/cwg20xx.cpp
clang/test/CXX/drs/cwg21xx.cpp
clang/test/CXX/drs/cwg22xx.cpp
clang/test/CXX/drs/cwg23xx.cpp
clang/test/CXX/drs/cwg24xx.cpp
clang/test/CXX/drs/cwg2504.cpp
clang/test/CXX/drs/cwg25xx.cpp
clang/test/CXX/drs/cwg26xx.cpp
clang/test/CXX/drs/cwg27xx.cpp
clang/test/CXX/drs/cwg28xx.cpp
clang/test/CXX/drs/cwg29xx.cpp
clang/test/CXX/drs/cwg2xx.cpp
clang/test/CXX/drs/cwg3xx.cpp
clang/test/CXX/drs/cwg492.cpp
clang/test/CXX/drs/cwg4xx.cpp
clang/test/CXX/drs/cwg571.cpp
clang/test/CXX/drs/cwg5xx.cpp
clang/test/CXX/drs/cwg6xx.cpp
clang/test/CXX/drs/cwg722.cpp
clang/test/CXX/drs/cwg7xx.cpp
clang/test/CXX/drs/cwg8xx.cpp
clang/test/CXX/drs/cwg9xx.cpp
Removed:
################################################################################
diff --git a/clang/test/CXX/drs/cwg0xx.cpp b/clang/test/CXX/drs/cwg0xx.cpp
index 8f7bd6532ae6d5..2e2e6d4e662d63 100644
--- a/clang/test/CXX/drs/cwg0xx.cpp
+++ b/clang/test/CXX/drs/cwg0xx.cpp
@@ -54,7 +54,7 @@ namespace cwg1 { // cwg1: no
// FIXME: This should be rejected, due to the ambiguous default argument.
i();
}
-}
+} // namespace cwg1
namespace cwg3 { // cwg3: yes
template<typename T> struct A {};
@@ -63,7 +63,7 @@ namespace cwg3 { // cwg3: yes
template<> struct A<int> {};
// expected-error at -1 {{explicit specialization of 'cwg3::A<int>' after instantiation}}
// expected-note@#cwg3-f-T {{implicit instantiation first required here}}
-}
+} // namespace cwg3
namespace cwg4 { // cwg4: 2.8
extern "C" {
@@ -74,7 +74,7 @@ namespace cwg4 { // cwg4: 2.8
// expected-error at -1 {{conflicting types for 'cwg4_g'}}
// expected-note@#cwg4-g-int {{previous definition is here}}
}
-}
+} // namespace cwg4
namespace cwg5 { // cwg5: 3.1
struct A {} a;
@@ -88,7 +88,7 @@ namespace cwg5 { // cwg5: 3.1
struct D : C {};
struct E { operator D&(); } e;
const C c = e;
-}
+} // namespace cwg5
namespace cwg7 { // cwg7: 3.4
class A { public: ~A(); };
@@ -118,7 +118,7 @@ namespace cwg7 { // cwg7: 3.4
};
S5::S5() {}
}
-}
+} // namespace cwg7
namespace cwg8 { // cwg8: dup 45
class A {
@@ -130,7 +130,7 @@ namespace cwg8 { // cwg8: dup 45
T<U, k, &A::f> *g();
};
A::T<A::U, A::k, &A::f> *A::g() { return 0; }
-}
+} // namespace cwg8
namespace cwg9 { // cwg9: 2.8
struct B {
@@ -146,7 +146,7 @@ namespace cwg9 { // cwg9: 2.8
// expected-note@#cwg9-N {{constrained by protected inheritance here}}
// expected-note@#cwg9-m {{member is declared here}}
int R2() { return n.m; }
-}
+} // namespace cwg9
namespace cwg10 { // cwg10: dup 45
class A {
@@ -154,7 +154,7 @@ namespace cwg10 { // cwg10: dup 45
A::B *p;
};
};
-}
+} // namespace cwg10
namespace cwg11 { // cwg11: yes
template<typename T> struct A : T {
@@ -168,7 +168,7 @@ namespace cwg11 { // cwg11: yes
};
struct X { typedef int U; };
A<X> ax;
-}
+} // namespace cwg11
namespace cwg12 { // cwg12: sup 239
enum E { e };
@@ -180,7 +180,7 @@ namespace cwg12 { // cwg12: sup 239
int &b = f(e);
int &c = f(1);
}
-}
+} // namespace cwg12
namespace cwg13 { // cwg13: no
extern "C" void f(int);
@@ -195,7 +195,7 @@ namespace cwg13 { // cwg13: no
A<char> a2(g);
int a3 = h(f); // FIXME: We should reject this.
int a4 = h(g);
-}
+} // namespace cwg13
namespace cwg14 { // cwg14: 3.4
namespace X { extern "C" int cwg14_f(); }
@@ -219,14 +219,14 @@ namespace cwg14 { // cwg14: 3.4
// expected-error at -1 {{reference to 'U' is ambiguous}}
// expected-note@#cwg14-X-U {{candidate found by name lookup is 'cwg14::X::U'}}
// expected-note@#cwg14-Y-U {{candidate found by name lookup is 'cwg14::Y::U'}}
-}
+} // namespace cwg14
namespace cwg15 { // cwg15: yes
template<typename T> void f(int); // #cwg15-f-decl-first
template<typename T> void f(int = 0);
// expected-error at -1 {{default arguments cannot be added to a function template that has already been declared}}
// expected-note@#cwg15-f-decl-first {{previous template declaration is here}}
-}
+} // namespace cwg15
namespace cwg16 { // cwg16: 2.8
class A { // #cwg16-A
@@ -248,7 +248,7 @@ namespace cwg16 { // cwg16: 2.8
// expected-note@#cwg16-B {{implicitly declared private here}}
}
};
-}
+} // namespace cwg16
namespace cwg17 { // cwg17: yes
class A {
@@ -261,7 +261,7 @@ namespace cwg17 { // cwg17: yes
struct A::C : A {
int g() { return n; }
};
-}
+} // namespace cwg17
// cwg18: sup 577
@@ -279,7 +279,7 @@ namespace cwg19 { // cwg19: 3.1
// expected-note@#cwg19-n {{member is declared here}}
int get2() { return ((A&)c).n; } // ok, A is an accessible base of B from here
};
-}
+} // namespace cwg19
namespace cwg20 { // cwg20: 2.8
class X {
@@ -292,7 +292,7 @@ namespace cwg20 { // cwg20: 2.8
X x = f();
// expected-error at -1 {{calling a private constructor of class 'cwg20::X'}}
// expected-note@#cwg20-X-ctor {{declared private here}}
-}
+} // namespace cwg20
namespace cwg21 { // cwg21: 3.4
template<typename T> struct A;
@@ -302,14 +302,14 @@ namespace cwg21 { // cwg21: 3.4
template<typename T = int> friend struct B;
// expected-error at -1 {{default template argument not permitted on a friend template}}
};
-}
+} // namespace cwg21
namespace cwg22 { // cwg22: sup 481
template<typename cwg22_T = cwg22_T> struct X;
// expected-error at -1 {{unknown type name 'cwg22_T'}}
typedef int T;
template<typename T = T> struct Y;
-}
+} // namespace cwg22
namespace cwg23 { // cwg23: yes
template<typename T> void f(T, T); // #cwg23-f-T-T
@@ -318,7 +318,7 @@ namespace cwg23 { // cwg23: yes
// expected-error at -1 {{call to 'f' is ambiguous}}
// expected-note@#cwg23-f-T-T {{candidate function [with T = int]}}
// expected-note@#cwg23-f-T-int {{candidate function [with T = int]}}
-}
+} // namespace cwg23
// cwg24: na
@@ -355,7 +355,7 @@ namespace cwg25 { // cwg25: yes
// since-cxx17-error at -2 {{
diff erent exception specifications}}
j = &A::f;
}
-}
+} // namespace cwg25
namespace cwg26 { // cwg26: yes
struct A { A(A, const A & = A()); };
@@ -375,12 +375,12 @@ namespace cwg26 { // cwg26: yes
// expected-error at -1 {{recursive evaluation of default argument}}
// expected-note at -2 {{default argument used here}}
};
-}
+} // namespace cwg26
namespace cwg27 { // cwg27: yes
enum E { e } n;
E &m = true ? n : n;
-}
+} // namespace cwg27
// cwg28: na lib
@@ -441,7 +441,7 @@ namespace cwg29 { // cwg29: 3.4
// expected-error at -1 {{declaration of 'cwg29_f8' has a
diff erent language linkage}}
// expected-note@#cwg29-f8 {{previous declaration is here}}
}
-}
+} // namespace cwg29
namespace cwg30 { // cwg30: sup 468 c++11
struct A {
@@ -454,7 +454,7 @@ namespace cwg30 { // cwg30: sup 468 c++11
// cxx98-error at -1 {{'template' keyword outside of a template}}
int z = p->template f<0>();
// cxx98-error at -1 {{'template' keyword outside of a template}}
-}
+} // namespace cwg30
namespace cwg31 { // cwg31: 2.8
class X {
@@ -466,7 +466,7 @@ namespace cwg31 { // cwg31: 2.8
X *p = new X;
// expected-error at -1 {{'operator delete' is a private member of 'cwg31::X'}}
// expected-note@#cwg31-delete {{declared private here}}
-}
+} // namespace cwg31
// cwg32: na
@@ -511,7 +511,7 @@ namespace cwg33 { // cwg33: 9
int m = Q() + X().f<int>; // ok
int n = Q() + (&(X().f<int>)); // ok
}
-}
+} // namespace cwg33
// cwg34: na
// cwg35: dup 178
@@ -619,7 +619,7 @@ namespace example4 {
// expected-note@#cwg36-E-k-first {{previous using declaration}}
};
}
-}
+} // namespace cwg36
// cwg37: sup 475
@@ -627,7 +627,7 @@ namespace cwg38 { // cwg38: yes
template<typename T> struct X {};
template<typename T> X<T> operator+(X<T> a, X<T> b) { return a; }
template X<int> operator+<int>(X<int>, X<int>);
-}
+} // namespace cwg38
namespace cwg39 { // cwg39: no
namespace example1 {
@@ -716,18 +716,18 @@ namespace cwg39 { // cwg39: no
// expected-note@#cwg39-A-n {{member found by ambiguous name lookup}}
#endif
}
-}
+} // namespace cwg39
// cwg40: na
namespace cwg41 { // cwg41: yes
struct S f(S);
-}
+} // namespace cwg41
namespace cwg42 { // cwg42: yes
struct A { static const int k = 0; };
struct B : A { static const int k = A::k; };
-}
+} // namespace cwg42
// cwg43: na
@@ -736,7 +736,7 @@ namespace cwg44 { // cwg44: sup 727
template<int> void f();
template<> void f<0>();
};
-}
+} // namespace cwg44
namespace cwg45 { // cwg45: yes
class A {
@@ -744,13 +744,13 @@ namespace cwg45 { // cwg45: yes
class C : B {};
C c;
};
-}
+} // namespace cwg45
namespace cwg46 { // cwg46: yes
template<typename> struct A { template<typename> struct B {}; };
template template struct A<int>::B<int>;
// expected-error at -1 {{expected unqualified-id}}
-}
+} // namespace cwg46
namespace cwg47 { // cwg47: sup 329
template<typename T> struct A {
@@ -764,7 +764,7 @@ namespace cwg47 { // cwg47: sup 329
void f();
void g() { f(); }
-}
+} // namespace cwg47
namespace cwg48 { // cwg48: yes
namespace {
@@ -780,7 +780,7 @@ namespace cwg48 { // cwg48: yes
const int &b = S::n;
const int S::o;
const int &c = S::o;
-}
+} // namespace cwg48
namespace cwg49 { // cwg49: 2.8
template<int*> struct A {}; // #cwg49-A
@@ -806,7 +806,7 @@ namespace cwg49 { // cwg49: 2.8
// since-cxx17-error@#cwg49-c {{non-type template argument is not a constant expression}}
// since-cxx17-note@#cwg49-c {{read of non-constexpr variable 'q' is not allowed in a constant expression}}
// since-cxx17-note@#cwg49-q {{declared here}}
-}
+} // namespace cwg49
namespace cwg50 { // cwg50: yes
struct X; // #cwg50-X
@@ -818,7 +818,7 @@ namespace cwg50 { // cwg50: yes
X *u = dynamic_cast<X*>(p);
// expected-error at -1 {{'cwg50::X' is an incomplete type}}
// expected-note@#cwg50-X {{forward declaration of 'cwg50::X'}}
-}
+} // namespace cwg50
namespace cwg51 { // cwg51: 2.8
struct A {};
@@ -828,7 +828,7 @@ namespace cwg51 { // cwg51: 2.8
operator B&();
} s;
A &a = s;
-}
+} // namespace cwg51
namespace cwg52 { // cwg52: 2.8
struct A { int n; }; // #cwg52-A
@@ -840,12 +840,12 @@ namespace cwg52 { // cwg52: 2.8
// expected-note@#cwg52-A {{member is declared here}}
// expected-error@#cwg52-k {{cannot cast 'struct B' to its private base class 'cwg52::A'}}
// expected-note@#cwg52-B {{declared private here}}
-}
+} // namespace cwg52
namespace cwg53 { // cwg53: yes
int n = 0;
enum E { e } x = static_cast<E>(n);
-}
+} // namespace cwg53
namespace cwg54 { // cwg54: 2.8
struct A { int a; } a;
@@ -899,12 +899,12 @@ namespace cwg54 { // cwg54: 2.8
// expected-error at -1 {{cannot cast 'cwg54::V *' to 'B *' via virtual base 'cwg54::V'}}
int B::*cmbv = (int B::*)(&V::v);
// expected-error at -1 {{conversion from pointer to member of class 'cwg54::V' to pointer to member of class 'B' via virtual base 'cwg54::V' is not allowed}}
-}
+} // namespace cwg54
namespace cwg55 { // cwg55: yes
enum E { e = 5 };
static_assert(e + 1 == 6, "");
-}
+} // namespace cwg55
namespace cwg56 { // cwg56: yes
struct A {
@@ -920,7 +920,7 @@ namespace cwg56 { // cwg56: yes
// expected-error at -1 {{redefinition of 'X'}}
// expected-note@#cwg56-typedef-X-X-first {{previous definition is here}}
};
-}
+} // namespace cwg56
namespace cwg58 { // cwg58: 3.1
// FIXME: Ideally, we should have a CodeGen test for this.
@@ -931,7 +931,7 @@ namespace cwg58 { // cwg58: 3.1
static_assert(X{E1_1, E2_m1}.e1 == 1, "");
static_assert(X{E1_1, E2_m1}.e2 == -1, "");
#endif
-}
+} // namespace cwg58
namespace cwg59 { // cwg59: yes
#pragma clang diagnostic push
@@ -988,14 +988,14 @@ namespace cwg59 { // cwg59: yes
int n4 = convert_to<const volatile int>();
int n5 = convert_to<const volatile int&>();
#pragma clang diagnostic pop
-}
+} // namespace cwg59
namespace cwg60 { // cwg60: yes
void f(int &);
int &f(...);
const int k = 0;
int &n = f(k);
-}
+} // namespace cwg60
namespace cwg61 { // cwg61: 3.4
struct X {
@@ -1012,7 +1012,7 @@ namespace cwg61 { // cwg61: 3.4
// expected-error at -1 {{cannot create a non-constant pointer to member function}}
void (*r)() = y.f;
// expected-error at -1 {{cannot create a non-constant pointer to member function}}
-}
+} // namespace cwg61
namespace cwg62 { // cwg62: 2.9
struct A {
@@ -1065,13 +1065,13 @@ namespace cwg62 { // cwg62: 2.9
X<int NoLinkage::*> d;
// cxx98-error at -1 {{template argument uses local type }}
}
-}
+} // namespace cwg62
namespace cwg63 { // cwg63: yes
template<typename T> struct S { typename T::error e; };
extern S<int> *p;
void *q = p;
-}
+} // namespace cwg63
namespace cwg64 { // cwg64: yes
template<class T> void f(T);
@@ -1079,7 +1079,7 @@ namespace cwg64 { // cwg64: yes
template<> void f(int*);
template<> void f<int>(int*);
template<> void f(int);
-}
+} // namespace cwg64
// cwg65: na
@@ -1100,7 +1100,7 @@ namespace cwg66 { // cwg66: no
int c = f(1, 2);
// expected-error at -1 {{no matching function for call to 'f'}}
// expected-note@#cwg66-f-first {{candidate function not viable: requires single argument 'n', but 2 arguments were provided}}
-}
+} // namespace cwg66
// cwg67: na
@@ -1121,7 +1121,7 @@ namespace cwg68 { // cwg68: 2.8
friend typename ::cwg68::X<double>;
// cxx98-error at -1 {{unelaborated friend declaration is a C++11 extension; specify 'struct' to befriend 'typename ::cwg68::X<double>'}}
};
-}
+} // namespace cwg68
namespace cwg69 { // cwg69: 9
template<typename T> static void f() {} // #cwg69-f
@@ -1134,59 +1134,59 @@ namespace cwg69 { // cwg69: 9
Q<&f<int> > q;
// cxx98-error at -1 {{non-type template argument referring to function 'f<int>' with internal linkage is a C++11 extension}}
// cxx98-note@#cwg69-f {{non-type template argument refers to function here}}
-}
+} // namespace cwg69
namespace cwg70 { // cwg70: yes
template<int> struct A {};
template<int I, int J> int f(int (&)[I + J], A<I>, A<J>);
int arr[7];
int k = f(arr, A<3>(), A<4>());
-}
+} // namespace cwg70
// cwg71: na
// cwg72: dup 69
-#if __cplusplus >= 201103L
namespace cwg73 { // cwg73: sup 1652
+#if __cplusplus >= 201103L
int a, b;
static_assert(&a + 1 != &b, "");
// expected-error at -1 {{static assertion expression is not an integral constant expression}}
// expected-note at -2 {{comparison against pointer '&a + 1' that points past the end of a complete object has unspecified value}}
-}
#endif
+} // namespace cwg73
namespace cwg74 { // cwg74: yes
enum E { k = 5 };
int (*p)[k] = new int[k][k];
-}
+} // namespace cwg74
namespace cwg75 { // cwg75: yes
struct S {
static int n = 0;
// expected-error at -1 {{non-const static data member must be initialized out of line}}
};
-}
+} // namespace cwg75
namespace cwg76 { // cwg76: yes
const volatile int n = 1;
static_assert(n, "");
// expected-error at -1 {{static assertion expression is not an integral constant expression}}
// expected-note at -2 {{read of volatile-qualified type 'const volatile int' is not allowed in a constant expression}}
-}
+} // namespace cwg76
namespace cwg77 { // cwg77: yes
struct A {
struct B {};
friend struct B;
};
-}
+} // namespace cwg77
namespace cwg78 { // cwg78: sup ????
// Under CWG78, this is valid, because 'k' has static storage duration, so is
// zero-initialized.
const int k;
// expected-error at -1 {{default initialization of an object of const type 'const int'}}
-}
+} // namespace cwg78
// cwg79: na
@@ -1208,7 +1208,7 @@ namespace cwg80 { // cwg80: 2.9
int D;
// expected-error at -1 {{member 'D' has the same name as its class}}
};
-}
+} // namespace cwg80
// cwg81: na
// cwg82: dup 48
@@ -1217,7 +1217,7 @@ namespace cwg83 { // cwg83: yes
int &f(const char*);
char &f(char *);
int &k = f("foo");
-}
+} // namespace cwg83
namespace cwg84 { // cwg84: yes
struct B;
@@ -1235,7 +1235,7 @@ namespace cwg84 { // cwg84: yes
// cxx98-14-error at -1 {{no viable constructor copying variable of type 'B'}}
// cxx98-14-note@#cwg84-copy-ctor {{candidate constructor not viable: expects an lvalue for 1st argument}}
// cxx98-14-note@#cwg84-ctor-from-C {{candidate constructor not viable: no known conversion from 'B' to 'C' for 1st argument}}
-}
+} // namespace cwg84
namespace cwg85 { // cwg85: 3.4
struct A {
@@ -1273,7 +1273,7 @@ namespace cwg85 { // cwg85: 3.4
// expected-error at -1 {{class member cannot be redeclared}}
// expected-note@#cwg85-C-B-def {{previous declaration is here}}
};
-}
+} // namespace cwg85
// cwg86: dup 446
@@ -1284,7 +1284,7 @@ namespace cwg87 { // cwg87: no
X<void() throw()> x;
// This is valid under cwg87 but not under cwg1975.
X<void(void() throw())> y;
-}
+} // namespace cwg87
namespace cwg88 { // cwg88: 2.8
template<typename T> struct S {
@@ -1295,7 +1295,7 @@ namespace cwg88 { // cwg88: 2.8
// expected-error at -1 {{static data member 'a' already has an initializer}}
// expected-note@#cwg88-a {{previous initialization is here}}
template<> const int S<int>::b = 4;
-}
+} // namespace cwg88
// cwg89: na
@@ -1331,12 +1331,12 @@ namespace cwg90 { // cwg90: yes
cwg90_g(F());
// expected-error at -1 {{use of undeclared identifier 'cwg90_g'}}
}
-}
+} // namespace cwg90
namespace cwg91 { // cwg91: yes
union U { friend int f(U); };
int k = f(U());
-}
+} // namespace cwg91
namespace cwg92 { // cwg92: 4 c++17
void f() throw(int, float);
@@ -1379,14 +1379,14 @@ namespace cwg92 { // cwg92: 4 c++17
// since-cxx17-error at -1 {{ISO C++17 does not allow dynamic exception specifications}}
// since-cxx17-note at -2 {{use 'noexcept(false)' instead}}
Y<&h> yp; // ok
-}
+} // namespace cwg92
// cwg93: na
namespace cwg94 { // cwg94: yes
struct A { static const int n = 5; };
int arr[A::n];
-}
+} // namespace cwg94
namespace cwg95 { // cwg95: 3.3
struct A;
@@ -1403,7 +1403,7 @@ namespace cwg95 { // cwg95: 3.3
struct B { void f() { N::C::f(); } };
// expected-error at -1 {{'f' is a private member of 'cwg95::N::C'}}
// expected-note@#cwg95-C-f {{implicitly declared private here}}
-}
+} // namespace cwg95
namespace cwg96 { // cwg96: sup P1787
struct A {
@@ -1424,14 +1424,14 @@ namespace cwg96 { // cwg96: sup P1787
A::template S<int> s;
B<A::template S> b;
}
-}
+} // namespace cwg96
namespace cwg97 { // cwg97: yes
struct A {
static const int a = false;
static const int b = !a;
};
-}
+} // namespace cwg97
namespace cwg98 { // cwg98: yes
void test(int n) {
@@ -1459,11 +1459,11 @@ namespace cwg98 { // cwg98: yes
// expected-note@#cwg98-catch {{jump bypasses initialization of catch block}}
}
}
-}
+} // namespace cwg98
namespace cwg99 { // cwg99: sup 214
template<typename T> void f(T&);
template<typename T> int &f(const T&);
const int n = 0;
int &r = f(n);
-}
+} // namespace cwg99
diff --git a/clang/test/CXX/drs/cwg10xx.cpp b/clang/test/CXX/drs/cwg10xx.cpp
index 01de13238a6ae2..c5b96c4ab8ffcf 100644
--- a/clang/test/CXX/drs/cwg10xx.cpp
+++ b/clang/test/CXX/drs/cwg10xx.cpp
@@ -13,7 +13,7 @@ namespace std {
const T *p; size_t n;
initializer_list(const T *p, size_t n);
};
-}
+} // namespace std
namespace cwg1004 { // cwg1004: 5
template<typename> struct A {};
@@ -44,7 +44,7 @@ namespace cwg1004 { // cwg1004: 5
// expected-error at -1 {{is a constructor name}}
// expected-note@#cwg1004-t {{in instantiation of default argument}}
Third<A<int> > t; // #cwg1004-t
-}
+} // namespace cwg1004
namespace cwg1042 { // cwg1042: 3.5
#if __cplusplus >= 201402L
@@ -59,7 +59,7 @@ namespace cwg1042 { // cwg1042: 3.5
// list in this mode.
using foo [[]] = int;
#endif
-}
+} // namespace cwg1042
namespace cwg1048 { // cwg1048: 3.6
struct A {};
@@ -77,7 +77,7 @@ namespace cwg1048 { // cwg1048: 3.6
}
} (0);
#endif
-}
+} // namespace cwg1048
namespace cwg1054 { // cwg1054: no
// FIXME: Test is incomplete.
@@ -90,7 +90,7 @@ namespace cwg1054 { // cwg1054: no
a;
// expected-warning at -1 {{expression result unused; assign into a variable to force a volatile load}}
}
-}
+} // namespace cwg1054
namespace cwg1070 { // cwg1070: 3.5
#if __cplusplus >= 201103L
@@ -109,4 +109,4 @@ namespace cwg1070 { // cwg1070: 3.5
};
C c = {};
#endif
-}
+} // namespace cwg1070
diff --git a/clang/test/CXX/drs/cwg11xx.cpp b/clang/test/CXX/drs/cwg11xx.cpp
index dc024caa5075ba..03612b6d87645e 100644
--- a/clang/test/CXX/drs/cwg11xx.cpp
+++ b/clang/test/CXX/drs/cwg11xx.cpp
@@ -128,6 +128,6 @@ namespace cwg1113 { // cwg1113: partial
extern "C" void f();
}
void g() { f(); }
-}
+} // namespace cwg1113
// cwg1150: na
diff --git a/clang/test/CXX/drs/cwg12xx.cpp b/clang/test/CXX/drs/cwg12xx.cpp
index 1011afa5905e71..344adb6d720231 100644
--- a/clang/test/CXX/drs/cwg12xx.cpp
+++ b/clang/test/CXX/drs/cwg12xx.cpp
@@ -30,10 +30,10 @@ namespace cwg1213 { // cwg1213: 7
using U = decltype(V4Int()[0]);
using U = decltype(EV4Int()[0]);
#endif
-}
+} // namespace cwg1213
-#if __cplusplus >= 201103L
namespace cwg1223 { // cwg1223: 17
+#if __cplusplus >= 201103L
struct M;
template <typename T>
struct V;
@@ -83,12 +83,11 @@ void g() {
sizeof(auto () -> C[1]);
// since-cxx11-error at -1 {{function cannot return array type 'C[1]' (aka 'cwg1223::BB[1]')}}
}
-
-}
#endif
+} // namespace cwg1223
-#if __cplusplus >= 201103L
namespace cwg1227 { // cwg1227: 3.0
+#if __cplusplus >= 201103L
template <class T> struct A { using X = typename T::X; };
// since-cxx11-error at -1 {{type 'int' cannot be used prior to '::' because it has no members}}
// since-cxx11-note@#cwg1227-g {{in instantiation of template class 'cwg1227::A<int>' requested here}}
@@ -102,8 +101,8 @@ void h() {
f<int>(0); // OK, substituting return type causes deduction to fail
g<int>(0); // #cwg1227-g-int
}
-}
#endif
+} // namespace cwg1227
namespace cwg1250 { // cwg1250: 3.9
struct Incomplete;
@@ -115,7 +114,7 @@ struct Base {
struct Derived : Base {
virtual Incomplete *meow();
};
-}
+} // namespace cwg1250
namespace cwg1265 { // cwg1265: 5
#if __cplusplus >= 201103L
@@ -135,7 +134,7 @@ namespace cwg1265 { // cwg1265: 5
auto k(), l();
// since-cxx14-error at -1 {{function with deduced return type must be the only declaration in its group}}
#endif
-}
+} // namespace cwg1265
// cwg1291: na
@@ -162,5 +161,4 @@ namespace cwg1295 { // cwg1295: 4
using T = decltype(true ? other : x.bitfield);
using T = unsigned;
#endif
-}
-
+} // namespace cwg1295
diff --git a/clang/test/CXX/drs/cwg13xx.cpp b/clang/test/CXX/drs/cwg13xx.cpp
index 980fcb4eb18ac5..9c72fefb5b65cd 100644
--- a/clang/test/CXX/drs/cwg13xx.cpp
+++ b/clang/test/CXX/drs/cwg13xx.cpp
@@ -14,10 +14,10 @@ namespace std {
size_t n;
initializer_list(const T*, size_t);
};
-}
+} // namespace std
-#if __cplusplus >= 201103L
namespace cwg1305 { // cwg1305: 3.0
+#if __cplusplus >= 201103L
struct Incomplete; // #cwg1305-Incomplete
struct Complete {};
@@ -25,8 +25,8 @@ int incomplete = alignof(Incomplete(&)[]);
// since-cxx11-error at -1 {{invalid application of 'alignof' to an incomplete type 'Incomplete'}}
// since-cxx11-note@#cwg1305-Incomplete {{forward declaration of 'cwg1305::Incomplete'}}
int complete = alignof(Complete(&)[]);
-}
#endif
+} // namespace cwg1305
namespace cwg1307 { // cwg1307: 14
#if __cplusplus >= 201103L
@@ -150,7 +150,7 @@ namespace cwg1310 { // cwg1310: 5
}
template void wt_test<W<int> >(); // #cwg1310-W-int
template void wt_test_good<W<int> >();
-}
+} // namespace cwg1310
namespace cwg1315 { // cwg1315: partial
template <int I, int J> struct A {};
@@ -182,7 +182,7 @@ namespace cwg1315 { // cwg1315: partial
template <typename T, int I> struct C;
template <typename T> struct C<T, T::value>;
// expected-error at -1 {{type of specialized non-type template argument depends on a template parameter of the partial specialization}}
-}
+} // namespace cwg1315
namespace cwg1330 { // cwg1330: 4 c++11
// exception-specifications are parsed in a context where the class is complete.
@@ -302,7 +302,7 @@ namespace cwg1330 { // cwg1330: 4 c++11
struct E : C<int> {}; // #cwg1330-C-int
E e; // #cwg1330-e
-}
+} // namespace cwg1330
// cwg1334: sup 1719
@@ -333,7 +333,7 @@ struct S {
int z : 1 || new int { 0 };
};
#endif
-}
+} // namespace cwg1341
namespace cwg1346 { // cwg1346: 3.5
auto a(1);
@@ -376,7 +376,7 @@ namespace cwg1346 { // cwg1346: 3.5
// since-cxx11-error at -2 {{cannot deduce type for lambda capture 'e' from parenthesized initializer list}}
}
#endif
-}
+} // namespace cwg1346
namespace cwg1347 { // cwg1347: 3.1
auto x = 5, *y = &x;
@@ -390,7 +390,7 @@ namespace cwg1347 { // cwg1347: 3.1
auto (*fp)(int) -> int, i = 0;
// since-cxx11-error at -1 {{declaration with trailing return type must be the only declaration in its group}}
#endif
-}
+} // namespace cwg1347
namespace cwg1350 { // cwg1350: 3.5
#if __cplusplus >= 201103L
@@ -520,7 +520,7 @@ namespace cwg1358 { // cwg1358: 3.1
// 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}}
};
#endif
-}
+} // namespace cwg1358
namespace cwg1359 { // cwg1359: 3.5
#if __cplusplus >= 201103L
@@ -549,7 +549,7 @@ namespace cwg1359 { // cwg1359: 3.5
// cxx11-17-note@#cwg1359-Y {{candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were provided}}
// cxx11-17-note@#cwg1359-Y {{candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 0 were provided}}
#endif
-}
+} // namespace cwg1359
namespace cwg1388 { // cwg1388: 4
template<typename A, typename ...T> void f(T..., A); // #cwg1388-f
@@ -622,7 +622,7 @@ namespace cwg1388 { // cwg1388: 4
// expected-error at -1 {{no matching function for call to 'f_pair_4'}}
// expected-note@#cwg1388-f-4 {{candidate template ignored: deduced packs of
diff erent lengths for parameter 'T' (<int, long> vs. <int, long, const char *>)}}
}
-}
+} // namespace cwg1388
namespace cwg1391 { // cwg1391: partial
struct A {}; struct B : A {};
@@ -713,14 +713,14 @@ namespace cwg1391 { // cwg1391: partial
int test_c1 = c(0); // ok
int test_c2 = c<int>(0); // FIXME: apparently ambiguous
}
-}
+} // namespace cwg1391
namespace cwg1394 { // cwg1394: 15
#if __cplusplus >= 201103L
struct Incomplete;
Incomplete f(Incomplete) = delete; // well-formed
#endif
-}
+} // namespace cwg1394
namespace cwg1395 { // cwg1395: 16
#if __cplusplus >= 201103L
@@ -731,7 +731,7 @@ namespace cwg1395 { // cwg1395: 16
f(&i);
}
#endif
-}
+} // namespace cwg1395
namespace cwg1397 { // cwg1397: 3.2
#if __cplusplus >= 201103L
@@ -757,4 +757,4 @@ namespace cwg1399 { // cwg1399: dup 1388
// expected-error at -1 {{no matching function for call to 'f'}}
// expected-note@#cwg1399-f {{candidate template ignored: deduced packs of
diff erent lengths for parameter 'T' (<> vs. <int, int>)}}
}
-}
+} // namespace cwg1399
diff --git a/clang/test/CXX/drs/cwg14xx.cpp b/clang/test/CXX/drs/cwg14xx.cpp
index cb2f34bf5e427f..149468eb292c96 100644
--- a/clang/test/CXX/drs/cwg14xx.cpp
+++ b/clang/test/CXX/drs/cwg14xx.cpp
@@ -40,7 +40,7 @@ namespace cwg1413 { // cwg1413: 12
// expected-note@#cwg1413-var2 {{'var2' declared here}}
}
};
-}
+} // namespace cwg1413
namespace cwg1423 { // cwg1423: 11
#if __cplusplus >= 201103L
@@ -53,7 +53,7 @@ namespace cwg1423 { // cwg1423: 11
bool b4{nullptr};
// since-cxx11-warning at -1 {{implicit conversion of nullptr constant to 'bool'}}
#endif
-}
+} // namespace 1423
// cwg1425: na abi
@@ -76,7 +76,7 @@ namespace cwg1432 { // cwg1432: 16
template struct common_type<int, double>;
#endif
-}
+} // namespace cwg1432
namespace cwg1443 { // cwg1443: yes
struct A {
@@ -84,7 +84,7 @@ struct A {
A() { void foo(int=i); }
// expected-error at -1 {{default argument references 'this'}}
};
-}
+} // namespace cwg1443
namespace cwg1458 { // cwg1458: 3.1
#if __cplusplus >= 201103L
@@ -357,7 +357,7 @@ namespace cwg1460 { // cwg1460: 3.5
static_assert(d.a == 0, "");
}
#endif
-}
+} // namespace cwg1460
#if __cplusplus >= 201103L
namespace std {
@@ -388,7 +388,7 @@ namespace std {
const _E* begin() const {return __begin_;}
const _E* end() const {return __begin_ + __size_;}
};
-} // std
+} // namespace std
#endif
namespace cwg1467 { // cwg1467: 3.7 c++11
@@ -601,7 +601,7 @@ namespace cwg1467 { // cwg1467: 3.7 c++11
}
} // namespace StringLiterals
#endif
-} // cwg1467
+} // namespace cwg1467
namespace cwg1477 { // cwg1477: 2.7
namespace N {
@@ -630,7 +630,7 @@ namespace cwg1479 { // cwg1479: 3.1
int operator""_a(const char*, std::size_t = 0);
// since-cxx11-error at -1 {{literal operator cannot have a default argument}}
#endif
-}
+} // namespace cwg1479
namespace cwg1482 { // cwg1482: 3.0
// NB: sup 2516, test reused there
@@ -675,7 +675,7 @@ namespace cwg1490 { // cwg1490: 3.7 c++11
std::initializer_list<char>{"abc"};
// since-cxx11-error at -1 {{expected unqualified-id}}}
#endif
-} // cwg1490
+} // namespace cwg1490
namespace cwg1495 { // cwg1495: 4
#if __cplusplus >= 201103L
@@ -717,7 +717,7 @@ namespace cwg1495 { // cwg1495: 4
// since-cxx14-note@#cwg1495-c {{template is declared here}}
#endif
#endif
-}
+} // namespace cwg1495
namespace cwg1496 { // cwg1496: no
#if __cplusplus >= 201103L
@@ -728,4 +728,4 @@ struct A {
// default constructor which is not deleted.
static_assert(__is_trivial(A), "");
#endif
-}
+} // namespace cwg1496
diff --git a/clang/test/CXX/drs/cwg15xx.cpp b/clang/test/CXX/drs/cwg15xx.cpp
index 961c25000111a0..d10890ee3fd153 100644
--- a/clang/test/CXX/drs/cwg15xx.cpp
+++ b/clang/test/CXX/drs/cwg15xx.cpp
@@ -170,7 +170,7 @@ namespace cwg1512 { // cwg1512: 4
// since-cxx11-note@#cwg1512-Wrap {{second operand was implicitly converted to type 'int *'}}
}
#endif
-}
+} // namespace cwg1512
namespace cwg1514 { // cwg1514: 11
#if __cplusplus >= 201103L
@@ -184,7 +184,7 @@ namespace cwg1514 { // cwg1514: 11
// The behavior in other contexts is superseded by CWG1966.
#endif
-}
+} // namespace cwg1514
namespace cwg1518 { // cwg1518: 4
#if __cplusplus >= 201103L
@@ -321,13 +321,13 @@ namespace std_example {
}
}
#endif // __cplusplus >= 201103L
-}
+} // namespace cwg1518
namespace cwg1550 { // cwg1550: 3.4
int f(bool b, int n) {
return (b ? (throw 0) : n) + (b ? n : (throw 0));
}
-}
+} // namespace cwg1550
namespace cwg1558 { // cwg1558: 12
#if __cplusplus >= 201103L
@@ -344,7 +344,7 @@ namespace cwg1558 { // cwg1558: 12
// since-cxx11-note@#cwg1558-f {{candidate template ignored: substitution failure [with T = int]: type 'int' cannot be used prior to '::' because it has no members}}
}
#endif
-}
+} // namespace cwg1558
namespace cwg1560 { // cwg1560: 3.5
void f(bool b, int n) {
@@ -353,7 +353,7 @@ namespace cwg1560 { // cwg1560: 3.5
class X { X(const X&); };
const X &get();
const X &x = true ? get() : throw 0;
-}
+} // namespace cwg1560
namespace cwg1563 { // cwg1563: yes
#if __cplusplus >= 201103L
@@ -363,7 +363,7 @@ namespace cwg1563 { // cwg1563: yes
using fun = double(double);
fun &foo{bar}; // ok
#endif
-}
+} // namespace cwg1563
namespace cwg1567 { // cwg1567: 3.3
#if __cplusplus >= 201103L
@@ -402,7 +402,7 @@ B b5{A{0}};
// since-cxx11-note@#cwg1567-B {{candidate constructor (the implicit move constructor) not viable: no known conversion from 'A' to 'B' for 1st argument}}
// since-cxx11-note@#cwg1567-B-double {{candidate constructor not viable: no known conversion from 'A' to 'double' for 1st argument}}
#endif
-}
+} // namespace cwg1567
namespace cwg1573 { // cwg1573: 3.9
#if __cplusplus >= 201103L
@@ -445,7 +445,7 @@ namespace cwg1573 { // cwg1573: 3.9
// since-cxx11-error at -1 {{call to deleted constructor of 'J'}}
// since-cxx11-note@#cwg1573-I {{'I' has been explicitly marked deleted here}}
#endif
-}
+} // namespace cwg1573
#if __cplusplus >= 201103L
namespace std {
@@ -485,7 +485,7 @@ namespace std {
};
typedef basic_string<char> string;
-} // std
+} // namespace std
#endif
namespace cwg1579 { // cwg1579: 3.9
@@ -558,7 +558,7 @@ auto CWG1579_lambda_invalid = []() -> GenericMoveOnly<char> {
// since-cxx11-note@#cwg1579-deleted-U {{'GenericMoveOnly<float>' has been explicitly marked deleted here}}
};
#endif
-} // end namespace cwg1579
+} // namespace cwg1579
namespace cwg1584 { // cwg1584: 7 drafting 2015-05
// Deducing function types from cv-qualified types
@@ -633,7 +633,7 @@ namespace cwg1589 { // cwg1589: 3.7 c++11
// since-cxx11-note@#cwg1589-f2-ilist-int {{candidate function}}
}
#endif
-} // cwg1589
+} // namespace cwg1589
namespace cwg1591 { //cwg1591. Deducing array bound and element type from initializer list
#if __cplusplus >= 201103L
@@ -718,4 +718,4 @@ namespace cwg1591 { //cwg1591. Deducing array bound and element type from initi
short *ps = i(Arr<int>{1, 2}); // OK #5
}
#endif
-} // cwg1591
+} // namespace cwg1591
diff --git a/clang/test/CXX/drs/cwg16xx.cpp b/clang/test/CXX/drs/cwg16xx.cpp
index 95e241f0d03e9b..bd2c484344ddfa 100644
--- a/clang/test/CXX/drs/cwg16xx.cpp
+++ b/clang/test/CXX/drs/cwg16xx.cpp
@@ -51,7 +51,7 @@ namespace cwg1611 { // cwg1611: dup 1658
struct B : virtual A { virtual void f() = 0; };
struct C : B { C() : A(0) {} void f(); };
C c;
-}
+} // namespace cwg1611
namespace cwg1631 { // cwg1631: 3.7
#if __cplusplus >= 201103L
@@ -81,7 +81,7 @@ namespace cwg1631 { // cwg1631: 3.7
}
}
#endif
-}
+} // namespace cwg1631
namespace cwg1638 { // cwg1638: 3.1
#if __cplusplus >= 201103L
@@ -122,7 +122,7 @@ namespace cwg1638 { // cwg1638: 3.1
// since-cxx11-note at -3 {{remove 'enum class' to befriend an enum}}
};
#endif
-}
+} // namespace cwg1638
namespace cwg1645 { // cwg1645: 3.9
#if __cplusplus >= 201103L
@@ -149,14 +149,14 @@ namespace cwg1645 { // cwg1645: 3.9
// since-cxx11-note@#cwg1645-int-int-int {{candidate inherited constructor has been explicitly deleted}}
// since-cxx11-note@#cwg1645-using {{constructor from base class 'A' inherited here}}
#endif
-}
+} // namespace cwg1645
namespace cwg1652 { // cwg1652: 3.6
int a, b;
static_assert(&a + 1 == &b, "");
// expected-error at -1 {{static assertion expression is not an integral constant expression}}
// expected-note at -2 {{comparison against pointer '&a + 1' that points past the end of a complete object has unspecified value}}
-}
+} // namespace cwg1652
namespace cwg1653 { // cwg1653: 4 c++17
void f(bool b) {
@@ -173,7 +173,7 @@ namespace cwg1653 { // cwg1653: 4 c++17
b += 1; // ok
b -= 1; // ok
}
-}
+} // namespace cwg1653
namespace cwg1658 { // cwg1658: 5
namespace DefCtor {
@@ -324,7 +324,7 @@ namespace cwg1658 { // cwg1658: 5
}
// assignment case is superseded by cwg2180
-}
+} // namespace cwg1658
namespace cwg1672 { // cwg1672: 7
struct Empty {};
@@ -349,7 +349,7 @@ namespace cwg1672 { // cwg1672: 7
static_assert(!__is_standard_layout(Y<G>), "");
static_assert(!__is_standard_layout(Y<H>), "");
static_assert(!__is_standard_layout(Y<X>), "");
-}
+} // namespace cwg1672
namespace cwg1684 { // cwg1684: 3.6
#if __cplusplus >= 201103L
@@ -363,7 +363,7 @@ namespace cwg1684 { // cwg1684: 3.6
// cxx11-20-error at -1 {{constexpr function's 1st parameter type 'NonLiteral' is not a literal type}}
// cxx11-20-note@#cwg1684-struct {{'NonLiteral' is not literal because it is not an aggregate and has no constexpr constructors other than copy or move constructors}}
#endif
-}
+} // namespace cwg1684
namespace cwg1687 { // cwg1687: 7
template<typename T> struct To {
@@ -386,7 +386,7 @@ namespace cwg1687 { // cwg1687: 7
// since-cxx20-error at -1 {{invalid operands to binary expression ('To<E1>' and 'To<E2>')}}
// since-cxx20-note@#cwg1687-op-T {{operand was implicitly converted to type 'cwg1687::E}}
#endif
-}
+} // namespace cwg1687
namespace cwg1690 { // cwg1690: 9
// See also the various tests in "CXX/basic/basic.lookup/basic.lookup.argdep".
@@ -401,7 +401,7 @@ namespace cwg1690 { // cwg1690: 9
f(s); // ok
}
#endif
-}
+} // namespace cwg1690
namespace cwg1691 { // cwg1691: 9
#if __cplusplus >= 201103L
@@ -421,7 +421,7 @@ namespace cwg1691 { // cwg1691: 9
// since-cxx11-note@#cwg1691-g {{'N::g' declared here}}
}
#endif
-}
+} // namespace cwg1691
namespace cwg1692 { // cwg1692: 9
namespace N {
@@ -436,7 +436,7 @@ namespace cwg1692 { // cwg1692: 9
N::A::B::C c;
f(c); // ok
}
-}
+} // namespace cwg1692
namespace cwg1696 { // cwg1696: 7
namespace std_examples {
@@ -554,4 +554,4 @@ namespace cwg1696 { // cwg1696: 7
// since-cxx11-note@#cwg1696-il-5 {{nitializing field 'il' with default member initializer}}
};
#endif
-}
+} // namespace cwg1696
diff --git a/clang/test/CXX/drs/cwg177x.cpp b/clang/test/CXX/drs/cwg177x.cpp
index 72a12c2f92c201..a17fd221b51f03 100644
--- a/clang/test/CXX/drs/cwg177x.cpp
+++ b/clang/test/CXX/drs/cwg177x.cpp
@@ -31,7 +31,7 @@ namespace cwg1772 { // cwg1772: 14
// CXX11-NEXT: StringLiteral{{.+}} 'const char[11]' lvalue "operator()"
}
#endif // __cplusplus >= 201103L
-}
+} // namespace cwg1772
namespace cwg1779 { // cwg1779: 14
// __func__ in a function template, member function template, or generic
@@ -79,4 +79,4 @@ namespace cwg1779 { // cwg1779: 14
};
}
#endif // __cplusplus >= 201402L
-}
+} // namespace cwg1779
diff --git a/clang/test/CXX/drs/cwg17xx.cpp b/clang/test/CXX/drs/cwg17xx.cpp
index fb53a56923b104..04bf637543a296 100644
--- a/clang/test/CXX/drs/cwg17xx.cpp
+++ b/clang/test/CXX/drs/cwg17xx.cpp
@@ -44,7 +44,7 @@ namespace cwg1715 { // cwg1715: 3.9
// since-cxx11-note@#cwg1715-E {{candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided}}
// since-cxx11-note@#cwg1715-E {{candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 2 were provided}}
#endif
-}
+} // namespace cwg1715
namespace cwg1719 { // cwg1719: 19
#if __cplusplus >= 201103L
@@ -96,7 +96,7 @@ struct A {
// operator, or move assignment operator.
static_assert(__is_trivially_copyable(A), "");
#endif
-}
+} // namespace cwg1734
namespace cwg1736 { // cwg1736: 3.9
#if __cplusplus >= 201103L
@@ -115,7 +115,7 @@ struct S {
struct Q { typedef int type; } q;
S s(q); // #cwg1736-s
#endif
-}
+} // namespace cwg1736
namespace cwg1738 { // cwg1738: sup P0136R1
#if __cplusplus >= 201103L
@@ -132,7 +132,7 @@ struct B : A {
template B::B(int, double);
// since-cxx11-error at -1 {{explicit instantiation of 'B' does not refer to a function template, variable template, member function, member class, or static data member}}
#endif
-}
+} // namespace cwg1738
// cwg1748 is in cwg1748.cpp
@@ -165,7 +165,7 @@ namespace cwg1753 { // cwg1753: 11
n.~decltype(n)(); // OK
#endif
}
-}
+} // namespace cwg1753
namespace cwg1756 { // cwg1756: 3.7
#if __cplusplus >= 201103L
@@ -176,7 +176,7 @@ namespace cwg1756 { // cwg1756: 3.7
struct X { operator int(); } x;
int b{x};
#endif
-}
+} // namespace cwg1756
namespace cwg1758 { // cwg1758: 3.7
#if __cplusplus >= 201103L
@@ -195,7 +195,7 @@ namespace cwg1758 { // cwg1758: 3.7
} b;
A a{b};
#endif
-}
+} // namespace cwg1758
namespace cwg1762 { // cwg1762: 14
#if __cplusplus >= 201103L
@@ -204,7 +204,7 @@ namespace cwg1762 { // cwg1762: 14
// since-cxx11-error at -1 {{invalid suffix on literal; C++11 requires a space between literal and identifier}}
// since-cxx11-warning at -2 {{user-defined literal suffixes not starting with '_' are reserved; no literal will invoke this operator}}
#endif
-}
+} // namespace cwg1762
// cwg1772 is in cwg177x.cpp
@@ -221,7 +221,7 @@ namespace cwg1778 { // cwg1778: 9
static_assert(!noexcept(C()), "");
static_assert(noexcept(D()), "");
#endif
-}
+} // namespace cwg1778
// cwg1779 is in cwg177x.cpp
diff --git a/clang/test/CXX/drs/cwg1807.cpp b/clang/test/CXX/drs/cwg1807.cpp
index 59edacc49658c6..a2c4968ef77354 100644
--- a/clang/test/CXX/drs/cwg1807.cpp
+++ b/clang/test/CXX/drs/cwg1807.cpp
@@ -15,7 +15,7 @@ struct S {
void f() {
S s[3];
}
-}
+} // namespace cwg1807
// CHECK-LABEL: define dso_local void @cwg1807::f()
// CHECK: invoke void @cwg1807::S::S(){{.+}}
diff --git a/clang/test/CXX/drs/cwg18xx.cpp b/clang/test/CXX/drs/cwg18xx.cpp
index 0fd2cd6b2d870c..4beeb41ac3728d 100644
--- a/clang/test/CXX/drs/cwg18xx.cpp
+++ b/clang/test/CXX/drs/cwg18xx.cpp
@@ -26,7 +26,7 @@ S<i> V; // #cwg1801-S-i
// cxx98-14-error at -1 {{non-type template argument does not refer to any declaration}}
// cxx98-14-note@#cwg1801-S {{template parameter is declared here}}
// cxx17-error@#cwg1801-S-i {{non-type template argument refers to subobject '.i'}}
-}
+} // namespace cwg1801
namespace cwg1802 { // cwg1802: 3.1
#if __cplusplus >= 201103L
@@ -204,7 +204,7 @@ namespace cwg1814 { // cwg1814: yes
auto lam = [](int x = 42) { return x; };
}
#endif
-}
+} // namespace cwg1814
namespace cwg1815 { // cwg1815: 20
#if __cplusplus >= 201402L
@@ -229,7 +229,7 @@ namespace cwg1815 { // cwg1815: 20
static_assert(f() == 0);
#endif
#endif
-}
+} // namespace cwg1815
// cwg1818 is in cwg1818.cpp
@@ -303,7 +303,7 @@ namespace cwg1822 { // cwg1822: yes
static_assert(__is_same(decltype(a), int), "should be resolved to lambda parameter");
};
#endif
-}
+} // namespace cwg1822
namespace cwg1824 { // cwg1824: 2.7
template<typename T>
@@ -373,7 +373,7 @@ namespace cwg1837 { // cwg1837: 3.3
};
};
#endif
-}
+} // namespace cwg1837
namespace cwg1862 { // cwg1862: no
template<class T>
@@ -498,7 +498,7 @@ namespace cwg1872 { // cwg1872: 9
// since-cxx23-note at -5 {{cannot construct object of type 'A<cwg1872::Z>' with virtual base class in a constant expression}}
#endif
#endif
-}
+} // namespace cwg1872
namespace cwg1878 { // cwg1878: 18
#if __cplusplus >= 201402L
@@ -533,7 +533,7 @@ struct S {
#endif
};
#endif
-}
+} // namespace cwg1878
namespace cwg1881 { // cwg1881: 7
struct A { int a : 4; };
@@ -545,7 +545,7 @@ namespace cwg1881 { // cwg1881: 7
struct D : C { int : 0; };
static_assert(__is_standard_layout(C), "");
static_assert(!__is_standard_layout(D), "");
-}
+} // namespace cwg1881
// cwg1884 is in cwg1884.cpp
@@ -613,7 +613,7 @@ void cwg1891() { // cwg1891: 4
// since-cxx11-error-re at -1 {{{{object of type '\(lambda at .+\)' cannot be assigned because its copy assignment operator is implicitly deleted}}}}
// since-cxx11-note@#cwg1891-b {{lambda expression begins here}}
#endif
-}
+} // void cwg1891()
namespace cwg1894 { // cwg1894: 3.8
// NB: reusing part of cwg407 test
@@ -641,7 +641,7 @@ namespace H {
using namespace A;
struct S s;
}
-}
+} // namespace cwg1894
namespace cwg1898 { // cwg1898: 2.7
void e(int) {} // #cwg1898-e
diff --git a/clang/test/CXX/drs/cwg19xx.cpp b/clang/test/CXX/drs/cwg19xx.cpp
index 2fe46909eaacb1..a01082a440278d 100644
--- a/clang/test/CXX/drs/cwg19xx.cpp
+++ b/clang/test/CXX/drs/cwg19xx.cpp
@@ -44,7 +44,7 @@ namespace cwg1902 { // cwg1902: 3.7
// since-cxx11-note@#cwg1902-B-A {{candidate constructor}}
// since-cxx11-note@#cwg1902-B-copy-ctor {{candidate constructor has been explicitly deleted}}
#endif
-}
+} // namespace cwg1902
namespace cwg1903 { // cwg1903: 2.7
namespace A {
@@ -69,7 +69,7 @@ namespace cwg1903 { // cwg1903: 2.7
using A::d;
struct a *p;
}
-}
+} // namespace cwg1903
namespace cwg1909 { // cwg1909: 3.7
struct A {
@@ -90,7 +90,7 @@ namespace cwg1909 { // cwg1909: 3.7
// cxx98-error at -1 {{alias declarations are a C++11 extension}}
// expected-error at -2 {{member 'D' has the same name as its class}}
};
-}
+} // namespace cwg1909
namespace cwg1918 { // cwg1918: no
template<typename T> struct A {
@@ -125,7 +125,7 @@ static union {
int not_empty;
};
#endif
-}
+} // namespace cwg1918
namespace cwg1941 { // cwg1941: 3.9
#if __cplusplus >= 201402L
@@ -155,7 +155,7 @@ struct iter {
derived d1(it, end);
derived d2(42, 9);
#endif
-}
+} // namespace cwg1941
namespace cwg1945 { // cwg1945: no
template<typename T> struct A {
@@ -180,7 +180,7 @@ unsigned b = 0b'01;
unsigned x = 0x'01;
// since-cxx14-error at -1 {{invalid suffix 'x'01' on integer constant}}
#endif
-}
+} // namespace cwg1947
#if __cplusplus >= 201103L
// cwg1948: 3.5
@@ -230,7 +230,7 @@ namespace cwg1959 { // cwg1959: 3.9
// where the base class is reference-related to the argument type.
c q(static_cast<c&&>(q));
#endif
-}
+} // namespace cwg1959
namespace cwg1960 { // cwg1960: no
struct A {
@@ -251,7 +251,7 @@ struct C : B {
using A::f;
using A::g;
};
-}
+} // namespace cwg1960
namespace cwg1966 { // cwg1966: 11
#if __cplusplus >= 201103L
@@ -280,7 +280,7 @@ namespace cwg1966 { // cwg1966: 11
// since-cxx11-error at -3 {{anonymous bit-field cannot have a default member initializer}}
};
#endif
-}
+} // namespace cwg1966
namespace cwg1968 { // cwg1968: no
#if __cplusplus >= 201103L
@@ -291,7 +291,7 @@ namespace cwg1968 { // cwg1968: no
constexpr const std::type_info *f() { return &typeid(int); }
static_assert(f() == f(), "");
#endif
-}
+} // namespace cwg1968
namespace cwg1991 { // cwg1991: 3.9
#if __cplusplus >= 201103L
@@ -309,6 +309,6 @@ namespace cwg1991 { // cwg1991: 3.9
// of ambiguity.
B b(0, 0); // ok, calls B constructor
#endif
-}
+} // namespace cwg1991
// cwg1994: dup 529
diff --git a/clang/test/CXX/drs/cwg1xx.cpp b/clang/test/CXX/drs/cwg1xx.cpp
index cc1dd784b127d1..39dfd310e93a3f 100644
--- a/clang/test/CXX/drs/cwg1xx.cpp
+++ b/clang/test/CXX/drs/cwg1xx.cpp
@@ -38,7 +38,7 @@ namespace cwg100 { // cwg100: yes
// cxx98-14-error@#cwg100-d {{non-type template argument does not refer to any declaration}}
// cxx98-14-note@#cwg100-D {{template parameter is declared here}}
// since-cxx17-error@#cwg100-d {{reference to subobject of string literal is not allowed in a template argument}}
-}
+} // namespace cwg100
namespace cwg101 { // cwg101: 3.5
extern "C" void cwg101_f();
@@ -51,7 +51,7 @@ namespace cwg101 { // cwg101: 3.5
using X::size_t;
extern "C" void cwg101_f();
typedef unsigned size_t;
-}
+} // namespace cwg101
namespace cwg102 { // cwg102: yes
namespace A {
@@ -65,7 +65,7 @@ namespace cwg102 { // cwg102: yes
}
B::S operator+(B::S, B::S); // #cwg102-operator-plus
template B::S A::f(B::S, B::S); // #cwg102-instantiation
-}
+} // namespace cwg102
// cwg103: na
// cwg104: na lib
@@ -85,12 +85,12 @@ namespace cwg106 { // cwg106: sup 540
// expected-warning at -1 {{'const' qualifier on reference type 'r2' (aka 'const int &') has no effect}}
typedef const r2 &r2;
// expected-warning at -1 {{'const' qualifier on reference type 'r2' (aka 'const int &') has no effect}}
-}
+} // namespace cwg106
namespace cwg107 { // cwg107: yes
struct S {};
extern "C" S operator+(S, S) { return S(); }
-}
+} // namespace cwg107
namespace cwg108 { // cwg108: 2.9
template<typename T> struct A {
@@ -101,7 +101,7 @@ namespace cwg108 { // cwg108: 2.9
// expected-error at -1 {{unknown type name 'X'}}
};
template<> struct A<int>::B { int X; };
-}
+} // namespace cwg108
namespace cwg109 { // cwg109: yes
struct A { template<typename T> void f(T); };
@@ -118,7 +118,7 @@ namespace cwg109 { // cwg109: yes
void g() { this->f<int>(123); }
// expected-error at -1 {{use 'template' keyword to treat 'f' as a dependent template name}}
};
-}
+} // namespace cwg109
namespace cwg110 { // cwg110: 2.8
template <typename T>
@@ -142,7 +142,7 @@ namespace cwg111 { // cwg111: dup 535
// expected-error at -1 {{no matching constructor for initialization of 'B'}}
// expected-note@#cwg111-B {{candidate constructor (the implicit copy constructor) not viable: 1st argument ('const B') would lose const qualifier}}
// expected-note@#cwg111-B {{candidate constructor not viable: requires 0 arguments, but 1 was provided}}
-}
+} // namespace cwg111
namespace cwg112 { // cwg112: yes
struct T { int n; };
@@ -162,7 +162,7 @@ namespace cwg112 { // cwg112: yes
// cxx98-error at -1 {{non-type template argument referring to object 'a3' with internal linkage is a C++11 extension}}
// cxx98-note@#cwg112-a3 {{non-type template argument refers to object here}}
X<a4> x4;
-}
+} // namespace cwg112
namespace cwg113 { // cwg113: yes
extern void (*p)();
@@ -173,7 +173,7 @@ namespace cwg113 { // cwg113: yes
}
void g();
void (*p)() = &g;
-}
+} // namespace cwg113
namespace cwg114 { // cwg114: yes
struct A {
@@ -185,7 +185,7 @@ namespace cwg114 { // cwg114: yes
} b;
// expected-error at -1 {{variable type 'struct B' is an abstract class}}
// expected-note@#cwg114-A-f {{unimplemented pure virtual method 'f' in 'B'}}
-}
+} // namespace cwg114
namespace cwg115 { // cwg115: 3.0
template<typename T> int f(T); // #cwg115-f
@@ -294,7 +294,7 @@ namespace cwg115 { // cwg115: 3.0
// expected-warning at -1 {{expression result unused}}
}
#endif
-}
+} // namespace cwg115
namespace cwg116 { // cwg116: yes
template<int> struct A {};
@@ -306,7 +306,7 @@ namespace cwg116 { // cwg116: yes
template<typename U> void f(A<sizeof(U)>) {}
// expected-error at -1 {{redefinition of 'f'}}
// expected-note@#cwg116-f-T {{previous definition is here}}
-}
+} // namespace cwg116
// cwg117: na
// cwg118 is in cwg118.cpp
@@ -324,12 +324,12 @@ namespace cwg121 { // cwg121: yes
// cxx98-17-error at -2 {{missing 'typename' prior to dependent type name T::Y; implicit 'typename' is a C++20 extension}}
};
Z<X> z;
-}
+} // namespace cwg121
namespace cwg122 { // cwg122: yes
template<typename T> void f();
void g() { f<int>(); }
-}
+} // namespace cwg122
// cwg123: na
// cwg124 is in cwg124.cpp
@@ -349,7 +349,7 @@ namespace cwg125 {
// since-cxx11-error@#cwg125_C {{'cwg125_B' is missing exception specification 'noexcept'}}
// since-cxx11-note@#cwg125_B {{previous declaration is here}}
};
-}
+} // namespace cwg125
namespace cwg126 { // cwg126: partial
// FIXME: We do not yet generate correct code for this change:
@@ -460,7 +460,7 @@ namespace cwg126 { // cwg126: partial
void f() throw(int);
// since-cxx17-error at -1 {{ISO C++17 does not allow dynamic exception specifications}}
// since-cxx17-note at -2 {{use 'noexcept(false)' instead}}
-}
+} // namespace cwg126
namespace cwg127 { // cwg127: 2.9
__extension__ typedef __decltype(sizeof(0)) size_t;
@@ -476,12 +476,12 @@ namespace cwg127 { // cwg127: 2.9
};
A<void> *p = new A<void>; // #cwg127-p
A<int> *q = new ("") A<int>; // #cwg127-q
-}
+} // namespace cwg127
namespace cwg128 { // cwg128: yes
enum E1 { e1 } x = e1;
enum E2 { e2 } y = static_cast<E2>(x), z = static_cast<E2>(e1);
-}
+} // namespace cwg128
// cwg129: dup 616
// cwg130: na
@@ -490,7 +490,7 @@ namespace cwg131 { // cwg131: sup P1949
const char *a_with_\u0e8c = "\u0e8c";
const char *b_with_\u0e8d = "\u0e8d";
const char *c_with_\u0e8e = "\u0e8e";
-}
+} // namespace cwg131
namespace cwg132 { // cwg132: no
void f() {
@@ -498,7 +498,7 @@ namespace cwg132 { // cwg132: no
extern struct S {} y; // FIXME: This is invalid.
}
static enum { E } e;
-}
+} // namespace cwg132
// cwg133: dup 87
// cwg134: na
@@ -509,7 +509,7 @@ namespace cwg135 { // cwg135: yes
friend A g(A a) { return a; }
static A h(A a) { return a; }
};
-}
+} // namespace cwg135
namespace cwg136 { // cwg136: 3.4
void f(int, int, int = 0); // #cwg136-f
@@ -557,7 +557,7 @@ namespace cwg136 { // cwg136: 3.4
// expected-error at -1 {{friend declaration specifying a default argument must be the only declaration}}
// expected-note@#cwg136-B-f {{previous declaration is here}}
};
-}
+} // namespace cwg136
namespace cwg137 { // cwg137: yes
extern void *p;
@@ -581,7 +581,7 @@ namespace cwg137 { // cwg137: yes
const volatile int *cvqc = static_cast<const volatile int*>(cp);
const volatile int *cvqv = static_cast<const volatile int*>(vp);
const volatile int *cvqcv = static_cast<const volatile int*>(cvp);
-}
+} // namespace cwg137
namespace cwg138 { // cwg138: partial
namespace example1 {
@@ -677,7 +677,7 @@ namespace cwg139 { // cwg139: yes
};
}
}
-}
+} // namespace cwg139
namespace cwg140 { // cwg140: yes
void f(int *const) {} // #cwg140-f-first
@@ -686,7 +686,7 @@ namespace cwg140 { // cwg140: yes
// expected-note@#cwg140-f-first {{previous definition is here}}
void g(const int);
void g(int n) { n = 2; }
-}
+} // namespace cwg140
namespace cwg141 { // cwg141: 3.1
template<typename T> void f();
@@ -728,7 +728,7 @@ namespace cwg141 { // cwg141: 3.1
template<typename T> void S();
};
void i() { C<X>().i(); } // ok!!
-}
+} // namespace cwg141
namespace cwg142 { // cwg142: 2.8
class B { // #cwg142-B
@@ -781,7 +781,7 @@ namespace cwg142 { // cwg142: 2.8
cwg142::B *bp2 = (cwg142::B*)this;
bp2->mi = 3;
}
-}
+} // namespace cwg142
namespace cwg143 { // cwg143: yes
namespace A { struct X; }
@@ -793,7 +793,7 @@ namespace cwg143 { // cwg143: yes
f(x);
// expected-error at -1 {{use of undeclared identifier 'f'}}
}
-}
+} // namespace cwg143
namespace cwg145 { // cwg145: yes
void f(bool b) {
@@ -804,7 +804,7 @@ namespace cwg145 { // cwg145: yes
// cxx98-14-warning at -1 {{incrementing expression of type bool is deprecated and incompatible with C++17}}
// since-cxx17-error at -2 {{ISO C++17 does not allow incrementing expression of type bool}}
}
-}
+} // namespace cwg145
namespace cwg147 { // cwg147: yes
namespace example1 {
@@ -832,13 +832,13 @@ namespace cwg147 { // cwg147: yes
template<> A<int>::A<int>(A<int>::a);
// expected-error at -1 {{qualified reference to 'A' is a constructor name rather than a template name in this context}}
}
-}
+} // namespace cwg147
namespace cwg148 { // cwg148: yes
struct A { int A::*p; };
static_assert(__is_pod(int(A::*)), "");
static_assert(__is_pod(A), "");
-}
+} // namespace cwg148
// cwg149: na
@@ -880,13 +880,13 @@ namespace cwg150 { // cwg150: 19
b + p;
}
} // namespace n1
-}
+} // namespace cwg150
namespace cwg151 { // cwg151: 3.1
struct X {};
typedef int X::*p;
static_assert(__enable_constant_folding(p() == 0), "");
-}
+} // namespace cwg151
namespace cwg152 { // cwg152: yes
struct A {
@@ -905,7 +905,7 @@ namespace cwg152 { // cwg152: yes
// expected-note@#cwg152-A-explicit-ctor {{explicit constructor is not a candidate}}
// expected-note@#cwg152-A-ctor {{candidate constructor not viable: requires 0 arguments, but 1 was provided}}
A a4(f());
-}
+} // namespace cwg152
// cwg153: na
@@ -916,12 +916,12 @@ namespace cwg154 { // cwg154: yes
union { int b; };
}
static union { int c; };
-}
+} // namespace cwg154
namespace cwg155 { // cwg155: dup 632
struct S { int n; } s = { { 1 } };
// expected-warning at -1 {{braces around scalar initializer}}
-}
+} // namespace cwg155
// cwg156: sup 1111
// cwg158 is in cwg158.cpp
@@ -932,7 +932,7 @@ namespace cwg159 { // cwg159: 3.5
void cwg159::f() {}
// expected-warning at -1 {{extra qualification on member 'f'}}
void cwg159::X::f() {}
-}
+} // namespace cwg159
// cwg160: na
@@ -971,7 +971,7 @@ namespace cwg161 { // cwg161: 3.1
D::sf();
}
};
-}
+} // namespace cwg161
namespace cwg162 { // cwg162: 19
struct A {
@@ -988,7 +988,7 @@ namespace cwg162 { // cwg162: 19
int &c = (&A::f)(0);
char &d = (&A::f)('0');
// expected-error at -1 {{non-const lvalue reference to type 'char' cannot bind to a value of unrelated type 'int'}}
-}
+} // namespace cwg162
// cwg163: na
@@ -1000,7 +1000,7 @@ namespace cwg164 { // cwg164: yes
int f(E);
int k = g(e);
-}
+} // namespace cwg164
namespace cwg165 { // cwg165: no
namespace N {
@@ -1011,7 +1011,7 @@ namespace cwg165 { // cwg165: no
struct N::B {};
// FIXME: cwg165 says this is ill-formed, but the argument in cwg1477 says it's ok
void N::g() {}
-}
+} // namespace cwg165
namespace cwg166 { // cwg166: 2.9
namespace A { class X; }
@@ -1043,7 +1043,7 @@ namespace cwg166 { // cwg166: 2.9
int i(A::X x) { return x.n; }
// expected-error at -1 {{'n' is a private member of 'cwg166::A::X'}}
// expected-note@#cwg166-X-n {{implicitly declared private here}}
-}
+} // namespace cwg166
// cwg167: sup 1012
@@ -1055,7 +1055,7 @@ namespace cwg168 { // cwg168: no
};
p a = &S::f; // FIXME: this should fail.
q b = &S::f;
-}
+} // namespace cwg168
namespace cwg169 { // cwg169: yes
template<typename> struct A { int n; };
@@ -1074,7 +1074,7 @@ namespace cwg169 { // cwg169: yes
using B::n<int>;
// expected-error at -1 {{using declaration cannot refer to a template specialization}}
};
-}
+} // namespace cwg169
namespace { // cwg171: 3.4
int cwg171a;
@@ -1085,7 +1085,7 @@ namespace cwg171 {
extern "C" void cwg171b();
// expected-error at -1 {{declaration of 'cwg171b' with C language linkage conflicts with declaration in global scope}}
// expected-note@#cwg171b-int {{declared in global scope here}}
-}
+} // namespace cwg171
namespace cwg172 { // cwg172: yes
enum { zero };
@@ -1119,13 +1119,13 @@ namespace cwg172 { // cwg172: yes
// cxx98-error at -1 {{'long long' is a C++11 extension}}
static_assert(sizeof(f) == sizeof(unsigned long), "");
static_assert(-f > 0, "");
-}
+} // namespace cwg172
namespace cwg173 { // cwg173: yes
static_assert('0' + 1 == '1' && '0' + 2 == '2' && '0' + 3 == '3' &&
'0' + 4 == '4' && '0' + 5 == '5' && '0' + 6 == '6' &&
'0' + 7 == '7' && '0' + 8 == '8' && '0' + 9 == '9', "");
-}
+} // namespace cwg173
// cwg174: sup 1012
@@ -1139,7 +1139,7 @@ namespace cwg175 { // cwg175: 2.8
// expected-note@#cwg175-A {{member is declared here}}
cwg175::A b;
};
-}
+} // namespace cwg175
namespace cwg176 { // cwg176: 3.1
template<typename T> class Y;
@@ -1179,7 +1179,7 @@ namespace cwg176 { // cwg176: 3.1
// since-cxx17-error@#cwg176-p4 {{use of class template 'cwg176::X' requires template arguments; argument deduction not allowed in non-static class member}}
// since-cxx17-note@#cwg176-X {{template is declared here}}
};
-}
+} // namespace cwg176
namespace cwg177 { // cwg177: yes
struct B {};
@@ -1200,7 +1200,7 @@ namespace cwg177 { // cwg177: yes
C c = e;
// expected-error at -1 {{no viable constructor copying variable of type 'D'}}
// expected-note@#cwg177-C-copy-ctor {{candidate constructor not viable: expects an lvalue for 1st argument}}
-}
+} // namespace cwg177
namespace cwg178 { // cwg178: yes
static_assert(int() == 0, "");
@@ -1213,13 +1213,13 @@ namespace cwg178 { // cwg178: yes
struct U : S { constexpr U() : S() {} };
static_assert(U().b == 0, "");
#endif
-}
+} // namespace cwg178
namespace cwg179 { // cwg179: yes
void f();
int n = &f - &f;
// expected-error at -1 {{arithmetic on pointers to the function type 'void ()'}}
-}
+} // namespace cwg179
namespace cwg180 { // cwg180: 2.8
template<typename T> struct X : T, T::some_base {
@@ -1229,7 +1229,7 @@ namespace cwg180 { // cwg180: 2.8
enum T::some_enum e;
}
};
-}
+} // namespace cwg180
namespace cwg181 { // cwg181: yes
namespace X {
@@ -1243,7 +1243,7 @@ namespace cwg181 { // cwg181: yes
template <template <class T> class X> struct A { };
template <template <class T> class X> void f(A<X>) { }
}
-}
+} // namespace cwg181
namespace cwg182 { // cwg182: 14
template <class T> struct C {
@@ -1266,7 +1266,7 @@ namespace cwg182 { // cwg182: 14
C<B> cb;
cb.f();
}
-}
+} // namespace cwg182
namespace cwg183 { // cwg183: sup 382
template<typename T> struct A {};
@@ -1277,7 +1277,7 @@ namespace cwg183 { // cwg183: sup 382
typename B<int>::X x;
// cxx98-error at -1 {{'typename' occurs outside of a template}}
};
-}
+} // namespace cwg183
namespace cwg184 { // cwg184: yes
template<typename T = float> struct B {};
@@ -1300,7 +1300,7 @@ namespace cwg184 { // cwg184: yes
}
void h() { A<B>().g(); }
-}
+} // namespace cwg184
// cwg185 is in cwg185.cpp
@@ -1309,12 +1309,12 @@ namespace cwg187 { // cwg187: sup 481
template<int X = Z, int Z = X> struct A;
typedef A<> T;
typedef A<1, 1> T;
-}
+} // namespace cwg187
namespace cwg188 { // cwg188: yes
char c[10];
static_assert(sizeof(0, c) == 10, "");
-}
+} // namespace cwg188
namespace cwg190 { // cwg190: 19
struct A {
@@ -1364,7 +1364,7 @@ namespace cwg191 { // cwg191: yes
}
};
}
-}
+} // namespace cwg191
namespace cwg192 { // cwg192: 2.7
struct S {
@@ -1390,7 +1390,7 @@ namespace cwg194 { // cwg194: yes
struct C {
inline explicit C(int) {}
};
-}
+} // namespace cwg194
namespace cwg195 { // cwg195: yes
void f();
@@ -1398,7 +1398,7 @@ namespace cwg195 { // cwg195: yes
// cxx98-error at -1 {{cast between pointer-to-function and pointer-to-object is an extension}}
void (*q)() = (void(*)())&p;
// cxx98-error at -1 {{cast between pointer-to-function and pointer-to-object is an extension}}
-}
+} // namespace cwg195
namespace cwg197 { // cwg197: yes
char &f(char);
@@ -1422,7 +1422,7 @@ namespace cwg197 { // cwg197: yes
g(2);
g(e); // #cwg197-g-e-call
}
-}
+} // namespace cwg197
namespace cwg198 { // cwg198: yes
struct A {
@@ -1447,6 +1447,6 @@ namespace cwg198 { // cwg198: yes
// cxx98-error at -1 {{invalid use of non-static data member 'n'}}
int f() { return n; }
};
-}
+} // namespace cwg198
// cwg199 is in cwg199.cpp
diff --git a/clang/test/CXX/drs/cwg20xx.cpp b/clang/test/CXX/drs/cwg20xx.cpp
index b2dc5a9865e382..d53d972306d684 100644
--- a/clang/test/CXX/drs/cwg20xx.cpp
+++ b/clang/test/CXX/drs/cwg20xx.cpp
@@ -22,7 +22,7 @@ int a = b2[0];
int b = __builtin_addressof(b2)->foo;
// cxx98-error at -1 {{no member named 'foo' in 'cwg2007::B<cwg2007::A<void> >'}}
// since-cxx11-error at -2 {{no member named 'foo' in 'cwg2007::B<cwg2007::A<void>>'}}
-}
+} // namespace cwg2007
// cwg2009: na
@@ -88,7 +88,7 @@ namespace cwg2026 { // cwg2026: 11
// since-cxx20-note at -3 {{read of object outside its lifetime is not allowed in a constant expression}}
#endif
}
-}
+} // namespace cwg2026
namespace cwg2049 { // cwg2049: 18
#if __cplusplus >= 202302L
@@ -97,7 +97,7 @@ X<> a;
X<nullptr> b;
static_assert(__is_same(decltype(a), decltype(b)));
#endif
-}
+} // namespace cwg2049
namespace cwg2061 { // cwg2061: yes
#if __cplusplus >= 201103L
@@ -125,7 +125,7 @@ namespace cwg2061 { // cwg2061: yes
A::C::S<int> s;
}
#endif // C++11
-}
+} // namespace cwg2061
namespace cwg2076 { // cwg2076: 13
#if __cplusplus >= 201103L
@@ -172,14 +172,14 @@ namespace cwg2076 { // cwg2076: 13
// since-cxx11-note@#cwg2076-bar {{cannot convert initializer list}}
}
#endif
-}
+} // namespace cwg2076
namespace cwg2082 { // cwg2082: 11
void test1(int x, int = sizeof(x)); // ok
#if __cplusplus >= 201103L
void test2(int x, int = decltype(x){}); // ok
#endif
-}
+} // namespace cwg2082
namespace cwg2083 { // cwg2083: partial
#if __cplusplus >= 201103L
@@ -399,7 +399,7 @@ namespace cwg2083 { // cwg2083: partial
}
}
#endif
-}
+} // namespace cwg2083
namespace cwg2091 { // cwg2091: 10
template<int &> struct X;
@@ -448,6 +448,6 @@ namespace cwg2094 { // cwg2094: 5
static_assert(__is_trivially_assignable(A, const A&), "");
static_assert(__is_trivially_assignable(B, const B&), "");
-}
+} // namespace cwg2094
// cwg2096: dup 2598
diff --git a/clang/test/CXX/drs/cwg21xx.cpp b/clang/test/CXX/drs/cwg21xx.cpp
index 2800228748e609..3f558a065dd368 100644
--- a/clang/test/CXX/drs/cwg21xx.cpp
+++ b/clang/test/CXX/drs/cwg21xx.cpp
@@ -64,7 +64,7 @@ namespace cwg2100 { // cwg2100: 12
template<int N> struct Y<N> {
static const int declared_later = 0;
};
-}
+} // namespace cwg2100
namespace cwg2103 { // cwg2103: yes
void f() {
@@ -79,7 +79,7 @@ namespace cwg2103 { // cwg2103: yes
}
};
}
-}
+} // namespace cwg2103
namespace cwg2120 { // cwg2120: 7
struct A {};
@@ -90,7 +90,7 @@ namespace cwg2120 { // cwg2120: 7
static_assert(__is_standard_layout(B), "");
static_assert(__is_standard_layout(D), "");
static_assert(!__is_standard_layout(E), "");
-}
+} // namespace cwg2120
namespace cwg2126 { // cwg2126: 12
#if __cplusplus >= 201103L
@@ -142,7 +142,7 @@ namespace cwg2126 { // cwg2126: 12
// since-cxx11-note@#cwg21260-j {{temporary created here}}
static_assert(k.a.n == 1, "");
#endif
-}
+} // namespace cwg2126
namespace cwg2137 { // cwg2137: 20
#if __cplusplus >= 201103L
@@ -177,7 +177,7 @@ namespace cwg2137 { // cwg2137: 20
int z = g({ d });
#endif
-}
+} // namespace cwg2137
namespace cwg2140 { // cwg2140: 9
#if __cplusplus >= 201103L
@@ -187,7 +187,7 @@ namespace cwg2140 { // cwg2140: 9
}
static_assert(!test({123}), "u.b should be valid even when b is inactive");
#endif
-}
+} // namespace cwg2140
namespace cwg2141 { // cwg2141: 17
struct A{};
@@ -220,7 +220,7 @@ void foo() {
// expected-error at -1 {{'E' cannot be defined in a type specifier}}
}
-}
+} // namespace cwg2141
// cwg2149 is in cwg2149.cpp
@@ -232,7 +232,7 @@ namespace cwg2157 { // cwg2157: 11
// since-cxx11-error at -1 {{ISO C++ only allows ':' in member enumeration declaration to introduce a fixed underlying type, not an anonymous bit-field}}
};
#endif
-}
+} // namespace cwg2157
// cwg2165: na
@@ -249,7 +249,7 @@ namespace cwg2170 { // cwg2170: 9
};
}
#endif
-}
+} // namespace cwg2170
namespace cwg2171 { // cwg2171: 15
#if __cplusplus >= 201103L
@@ -315,7 +315,7 @@ namespace cwg2180 { // cwg2180: yes
// cxx98-note@#cwg2180-A-move {{implicitly declared private here}}
// since-cxx11-error@#cwg2180-B-move {{defaulting this move assignment operator would delete it after its first declaration}}
// since-cxx11-note@#cwg2180-B {{move assignment operator of 'B' is implicitly deleted because base class 'A' has an inaccessible move assignment operator}}
-}
+} // namespace cwg2180
namespace cwg2199 { // cwg2199: 3.8
// NB: reusing part of cwg407 test
@@ -343,4 +343,4 @@ namespace H {
using namespace A;
struct S s;
}
-}
+} // namespace cwg2199
diff --git a/clang/test/CXX/drs/cwg22xx.cpp b/clang/test/CXX/drs/cwg22xx.cpp
index 0614d4f34ad5e4..46ae73212b2433 100644
--- a/clang/test/CXX/drs/cwg22xx.cpp
+++ b/clang/test/CXX/drs/cwg22xx.cpp
@@ -7,8 +7,8 @@
// RUN: %clang_cc1 -std=c++2c -triple x86_64-unknown-unknown %s -verify=expected,since-cxx11 -fexceptions -fcxx-exceptions -pedantic-errors
-#if __cplusplus >= 201103L
namespace cwg2211 { // cwg2211: 8
+#if __cplusplus >= 201103L
void f() {
int a;
auto f = [a](int a) { (void)a; };
@@ -16,8 +16,8 @@ void f() {
// since-cxx11-note at -2 {{variable 'a' is explicitly captured here}}
auto g = [=](int a) { (void)a; };
}
-}
#endif
+} // namespace cwg2211
namespace cwg2213 { // cwg2213: yes
template <typename T, typename U>
@@ -41,7 +41,7 @@ struct AnonBitfieldQualifiers {
volatile unsigned i2 : 1;
const volatile unsigned i3 : 1;
};
-}
+} // namespace cwg2229
namespace cwg2233 { // cwg2233: 11
#if __cplusplus >= 201103L
@@ -153,7 +153,7 @@ D d1(c);
const D &d2{c}; // FIXME ill-formed
const D &d3(c); // FIXME ill-formed
#endif
-}
+} // namespace cwg2267
namespace cwg2273 { // cwg2273: 3.3
#if __cplusplus >= 201103L
@@ -170,7 +170,7 @@ B b;
// since-cxx11-note@#cwg2273-B {{default constructor of 'B' is implicitly deleted because base class 'A' has a deleted default constructor}}
// since-cxx11-note@#cwg2273-A {{'A' has been explicitly marked deleted here}}
#endif
-}
+} // namespace cwg2273
namespace cwg2277 { // cwg2277: partial
#if __cplusplus >= 201103L
@@ -194,7 +194,7 @@ void g() {
// since-cxx11-note@#cwg2277-B-f {{candidate function}}
}
#endif
-}
+} // namespace cwg2277
namespace cwg2292 { // cwg2292: 9
#if __cplusplus >= 201103L
@@ -203,4 +203,4 @@ namespace cwg2292 { // cwg2292: 9
p->template id<int>::~id<int>();
}
#endif
-}
+} // namespace cwg2292
diff --git a/clang/test/CXX/drs/cwg23xx.cpp b/clang/test/CXX/drs/cwg23xx.cpp
index f4992c1426844a..ded0219398334c 100644
--- a/clang/test/CXX/drs/cwg23xx.cpp
+++ b/clang/test/CXX/drs/cwg23xx.cpp
@@ -16,8 +16,8 @@ namespace std {
};
}
-#if __cplusplus >= 201103L
namespace cwg2303 { // cwg2303: 12
+#if __cplusplus >= 201103L
template <typename... T>
struct A;
template <>
@@ -54,8 +54,8 @@ void g() {
struct cwg2303::F -> B -> A<int, int>
struct cwg2303::F -> E -> A<int, int>}} */
}
-} // namespace cwg2303
#endif
+} // namespace cwg2303
namespace cwg2304 { // cwg2304: 2.8
template<typename T> void foo(T, int);
@@ -191,10 +191,10 @@ auto j = std::initializer_list<InitListCtor>{ i };
// since-cxx17-error at -1 {{conversion function from 'std::initializer_list<InitListCtor>' to 'const cwg2311::InitListCtor' invokes a deleted function}}
// since-cxx17-note@#cwg2311-InitListCtor {{'InitListCtor' has been explicitly marked deleted here}}
#endif
-}
+} // namespace cwg2311
-#if __cplusplus >= 201103L
namespace cwg2338 { // cwg2338: 12
+#if __cplusplus >= 201103L
namespace B {
enum E : bool { Zero, One };
static_assert((int)(E)2 == 1, "");
@@ -203,15 +203,15 @@ namespace D {
enum class E : bool { Zero, One };
static_assert((int)(E)2 == 1, "");
} // namespace D
-} // namespace cwg2338
#endif
+} // namespace cwg2338
namespace cwg2346 { // cwg2346: 11
void test() {
const int i2 = 0;
extern void h2b(int x = i2 + 0); // ok, not odr-use
}
-}
+} // namespace cwg2346
namespace cwg2351 { // cwg2351: 20
#if __cplusplus >= 201103L
@@ -248,7 +248,7 @@ namespace cwg2351 { // cwg2351: 20
// cxx98-note at -2 {{to match this '('}}
// cxx98-error at -3 {{expected expression}}
#endif
-}
+} // namespace cwg2351
namespace cwg2352 { // cwg2352: 10
int **p;
@@ -350,18 +350,18 @@ B b2 = static_cast<B&&>(b1); // calls #3: #1, #2, and #4 are not viable
struct C { operator B&&(); };
B b3 = C(); // calls #3
#endif
-}
+} // namespace cwg2356
-#if __cplusplus >= 201402L
namespace cwg2358 { // cwg2358: 16
+#if __cplusplus >= 201402L
void f2() {
int i = 1;
void g1(int = [xxx=1] { return xxx; }()); // OK
void g2(int = [xxx=i] { return xxx; }());
// since-cxx14-error at -1 {{default argument references local variable 'i' of enclosing function}}
}
-}
#endif
+} // namespace cwg2358
// CWG2363 was closed as NAD, but its resolution does affirm that
// a friend declaration cannot have an opaque-enumm-specifier.
@@ -411,11 +411,11 @@ class C {
};
} // namespace cwg2370
-#if __cplusplus >= 201702L
+namespace cwg2386 { // cwg2386: 9
// Otherwise, if the qualified-id std::tuple_size<E> names a complete class
// type **with a member value**, the expression std::tuple_size<E>::value shall
// be a well-formed integral constant expression
-namespace cwg2386 { // cwg2386: 9
+#if __cplusplus >= 201702L
struct Bad1 { int a, b; };
struct Bad2 { int a, b; };
} // namespace cwg2386
@@ -430,8 +430,8 @@ namespace cwg2386 {
void no_value() { auto [x, y] = Bad1(); }
void wrong_value() { auto [x, y] = Bad2(); }
// since-cxx17-error at -1 {{type 'Bad2' decomposes into 42 elements, but only 2 names were provided}}
-} // namespace cwg2386
#endif
+} // namespace cwg2386
// cwg2385: na
@@ -451,7 +451,7 @@ namespace cwg2387 { // cwg2387: 9
extern template int d<int>;
extern template const int d<const int>;
#endif
-}
+} // namespace cwg2387
namespace cwg2390 { // cwg2390: 14
// Test that macro expansion of the builtin argument works.
@@ -499,7 +499,7 @@ const A a;
struct B { const A a; };
B b;
-}
+} // namespace cwg2394
namespace cwg2396 { // cwg2396: no
struct A {
@@ -515,24 +515,21 @@ namespace cwg2396 { // cwg2396: no
// void f(A a) { a.operator B B::*(); }
// void g(A a) { a.operator decltype(B()) B::*(); }
// void g2(A a) { a.operator B decltype(B())::*(); }
-}
+} // namespace cwg2396
-#if __cplusplus >= 201103L
namespace cwg2397 { // cwg2397: 17
+#if __cplusplus >= 201103L
void foo() {
int a[5];
auto (&b)[5] = a;
auto (*c)[5] = &a;
}
-} // namespace cwg2397
-
#endif
-
-#if __cplusplus >= 202002L
+} // namespace cwg2397
namespace cwg2369 { // cwg2369: partial
-
+#if __cplusplus >= 202002L
template <class T> struct Z {
typedef typename T::x xx;
};
@@ -557,6 +554,5 @@ void foo() {
f(zz, 42); // OK, deduction fails for #1 because C<int> is not satisfied
}
-} // namespace cwg2369
-
#endif
+} // namespace cwg2369
diff --git a/clang/test/CXX/drs/cwg24xx.cpp b/clang/test/CXX/drs/cwg24xx.cpp
index 79e9d031ef41c0..316622460e147f 100644
--- a/clang/test/CXX/drs/cwg24xx.cpp
+++ b/clang/test/CXX/drs/cwg24xx.cpp
@@ -39,7 +39,7 @@ void fallthrough(int n) {
}
}
#endif
-}
+} // namespace cwg2406
namespace cwg2428 { // cwg2428: 19
#if __cplusplus >= 202002L
@@ -110,7 +110,7 @@ f<{.a= 0}>();
}
#endif
-}
+} // namespace cwg2450
namespace cwg2459 { // cwg2459: 18
#if __cplusplus >= 202302L
@@ -120,7 +120,7 @@ struct A {
template<A> struct X {};
X<1> x;
#endif
-}
+} // namespace cwg2459
namespace cwg2445 { // cwg2445: 19
#if __cplusplus >= 202002L
@@ -181,7 +181,7 @@ namespace cwg2445 { // cwg2445: 19
return d + 1;
}
#endif
-}
+} // namespace cwg2445
namespace cwg2486 { // cwg2486: 4 c++17
struct C {
diff --git a/clang/test/CXX/drs/cwg2504.cpp b/clang/test/CXX/drs/cwg2504.cpp
index fa775df327cbe2..535ef9b8a7c42d 100644
--- a/clang/test/CXX/drs/cwg2504.cpp
+++ b/clang/test/CXX/drs/cwg2504.cpp
@@ -21,7 +21,7 @@ struct B : A {
struct C : B {};
void foo() { C c; } // bar is not invoked, because the V subobject is not initialized as part of B
#endif
-}
+} // namespace cwg2504
// FIXME: As specified in the comment above (which comes from an example in the Standard),
// we are not supposed to unconditionally call `bar()` and call a constructor
diff --git a/clang/test/CXX/drs/cwg25xx.cpp b/clang/test/CXX/drs/cwg25xx.cpp
index 87a728088ee6e4..a6e2396f849699 100644
--- a/clang/test/CXX/drs/cwg25xx.cpp
+++ b/clang/test/CXX/drs/cwg25xx.cpp
@@ -71,7 +71,7 @@ int test_specialization() {
}
#endif
-}
+} // namespace cwg2518
namespace cwg2521 { // cwg2521: 17
#if __cplusplus >= 201103L
@@ -120,8 +120,8 @@ struct S2 {
#endif
} // namespace cwg2547
-#if __cplusplus >= 202302L
namespace cwg2553 { // cwg2553: 18 review 2023-07-14
+#if __cplusplus >= 202302L
struct B {
virtual void f(this B&);
// since-cxx23-error at -1 {{an explicit object parameter cannot appear in a virtual function}}
@@ -134,12 +134,11 @@ struct D : B {
// since-cxx23-error at -1 {{an explicit object parameter cannot appear in a virtual function}}
// since-cxx23-note@#cwg2553-g {{overridden virtual function is here}}
};
-
-}
#endif
+} // namespace cwg2553
-#if __cplusplus >= 202302L
namespace cwg2554 { // cwg2554: 18 review 2021-12-10
+#if __cplusplus >= 202302L
struct B {
virtual void f(); // #cwg2554-g
};
@@ -161,12 +160,11 @@ struct D3 : B {
// since-cxx23-error at -1 {{an explicit object parameter cannot appear in a virtual function}}
// since-cxx23-note@#cwg2554-g {{overridden virtual function is here}}
};
-
-}
#endif
+} // namespace cwg2554
-#if __cplusplus >= 202302L
namespace cwg2561 { // cwg2561: no
+#if __cplusplus >= 202302L
struct C {
constexpr C(auto) { }
};
@@ -178,10 +176,8 @@ void foo() {
static_assert(fp(1) == 1);
static_assert((&decltype(b)::operator())(1) == 1);
}
-
-}
#endif
-
+} // namespace cwg2561
namespace cwg2565 { // cwg2565: 16 open 2023-06-07
#if __cplusplus >= 202002L
@@ -251,7 +247,7 @@ namespace cwg2565 { // cwg2565: 16 open 2023-06-07
// expected-note at -2 {{because substituted constraint expression is ill-formed: constraint depends on a previously diagnosed expression}}
#endif
-}
+} // namespace cwg2565
namespace cwg2583 { // cwg2583: 19
#if __cplusplus >= 201103L
@@ -372,8 +368,5 @@ union U {
};
static_assert(!__is_literal(U), "");
#endif
-
-
-
#endif
-}
+} // namespace cwg2598
diff --git a/clang/test/CXX/drs/cwg26xx.cpp b/clang/test/CXX/drs/cwg26xx.cpp
index 35814ca9a26a39..58e047f72bf7c3 100644
--- a/clang/test/CXX/drs/cwg26xx.cpp
+++ b/clang/test/CXX/drs/cwg26xx.cpp
@@ -33,7 +33,7 @@ namespace std {
static_assert(sizeof(int16_t) == 2 && sizeof(int32_t) == 4 && sizeof(int64_t) == 8, "Some tests rely on these sizes");
template<typename T> T declval();
-}
+} // namespace std
namespace cwg2621 { // cwg2621: sup 2877
#if __cplusplus >= 202002L
@@ -49,7 +49,7 @@ int E; // ignored by type-only lookup
using enum E;
}
#endif
-}
+} // namespace cwg2621
namespace cwg2627 { // cwg2627: 20
#if __cplusplus >= 202002L
@@ -155,7 +155,7 @@ void f() {
// FIXME-since-cxx20-note@#cwg2628-ctor {{marked deleted here}}
}
#endif
-}
+} // namespace cwg2628
// cwg2630 is in cwg2630.cpp
@@ -175,7 +175,7 @@ namespace cwg2631 { // cwg2631: 16
return k();
}
#endif
-}
+} // namespace cwg2631
namespace cwg2635 { // cwg2635: 16
#if __cplusplus >= 202002L
@@ -205,7 +205,7 @@ void TemplUse() {
// since-cxx20-error at -1 {{decomposition declaration cannot be declared with constrained 'auto'}}
}
#endif
-}
+} // namespace cwg2635
// cwg2636: na
@@ -230,7 +230,7 @@ int y = cwg2640_a\N{LOTUS});
// expected-error at -1 {{character <U+1FAB7> not allowed in an identifier}}
// expected-error at -2 {{use of undeclared identifier 'cwg2640_a🪷'}}
// expected-error at -3 {{extraneous ')' before ';'}}
-}
+} // namespace cwg2640
// cwg2642: na
@@ -243,10 +243,10 @@ auto z = [a = 42](int a) {
return 1;
};
#endif
-}
+} // namespace cwg2644
-#if __cplusplus >= 202302L
namespace cwg2650 { // cwg2650: 17
+#if __cplusplus >= 202302L
template <class T, T> struct S {};
template <class T> int f(S<T, T{}>*); // #cwg2650-f
class X {
@@ -255,17 +255,17 @@ class X {
int i0 = f<X>(0);
// since-cxx23-error at -1 {{no matching function for call to 'f'}}
// since-cxx23-note@#cwg2650-f {{type 'X' of non-type template parameter is not a structural type}}
-}
#endif
+} // namespace cwg2650
-#if __cplusplus >= 202302L
namespace cwg2653 { // cwg2653: 18
+#if __cplusplus >= 202302L
struct Test { void f(this const auto& = Test{}); };
// since-cxx23-error at -1 {{the explicit object parameter cannot have a default argument}}
auto L = [](this const auto& = Test{}){};
// since-cxx23-error at -1 {{the explicit object parameter cannot have a default argument}}
-}
#endif
+} // namespace cwg2653
namespace cwg2654 { // cwg2654: 16
void f() {
@@ -275,7 +275,7 @@ void f() {
brachiosaur -= neck; // OK
brachiosaur |= neck; // OK
}
-}
+} // namespace cwg2654
namespace cwg2681 { // cwg2681: 17
#if __cplusplus >= 202002L
@@ -308,7 +308,7 @@ J j = { "ghi" };
// since-cxx20-note@#cwg2681-J {{candidate function template not viable: requires 0 arguments, but 1 was provided}}
// since-cxx20-note@#cwg2681-J {{implicit deduction guide declared as 'template <size_t N> J() -> J<N>'}}
#endif
-}
+} // namespace cwg2681
namespace cwg2672 { // cwg2672: 18
#if __cplusplus >= 202002L
@@ -333,10 +333,10 @@ void m() {
bar(0);
}
#endif
-}
+} // namespace cwg2672
-#if __cplusplus >= 202302L
namespace cwg2687 { // cwg2687: 18
+#if __cplusplus >= 202302L
struct S{
void f(int);
static void g(int);
@@ -349,9 +349,8 @@ void test() {
(&S::g)(1);
(&S::h)(S(), 1);
}
-}
#endif
-
+} // namespace cwg2687
namespace cwg2692 { // cwg2692: 19
#if __cplusplus >= 202302L
@@ -377,4 +376,4 @@ namespace cwg2692 { // cwg2692: 19
// expected-note@#cwg2692-2 {{candidate function not viable: requires 1 argument, but 0 were provided}}
}
#endif
-}
+} // namespace cwg2692
diff --git a/clang/test/CXX/drs/cwg27xx.cpp b/clang/test/CXX/drs/cwg27xx.cpp
index b0adf5690acc64..b5e2368d921fb5 100644
--- a/clang/test/CXX/drs/cwg27xx.cpp
+++ b/clang/test/CXX/drs/cwg27xx.cpp
@@ -174,8 +174,8 @@ static_assert(!__is_layout_compatible(StructWithAnonUnion, StructWithAnonUnion3)
#endif
} // namespace cwg2759
-#if __cplusplus >= 202002L
namespace cwg2770 { // cwg2770: 20
+#if __cplusplus >= 202002L
template<typename T>
struct B {
static_assert(sizeof(T) == 1);
@@ -191,8 +191,8 @@ int f(T t, long);
int i = f(1, 2);
int j = f('a', 2);
-} // namespace cwg2770
#endif
+} // namespace cwg2770
namespace cwg2789 { // cwg2789: 18
#if __cplusplus >= 202302L
@@ -224,7 +224,7 @@ void test() {
// since-cxx23-note@#cwg2789-g2 {{candidate function}}
}
#endif
-}
+} // namespace cwg2789
namespace cwg2798 { // cwg2798: 17
#if __cplusplus > 202302L
diff --git a/clang/test/CXX/drs/cwg28xx.cpp b/clang/test/CXX/drs/cwg28xx.cpp
index 40e2b25eedde09..b0c46ee2d493a2 100644
--- a/clang/test/CXX/drs/cwg28xx.cpp
+++ b/clang/test/CXX/drs/cwg28xx.cpp
@@ -59,7 +59,7 @@ namespace cwg2819 { // cwg2819: 19 c++26
// cxx11-23-note at -2 {{initializer of 'q' is not a constant expression}}
// cxx11-23-note@#cwg2819-q {{declared here}}
#endif
-}
+} // namespace cwg2819
namespace cwg2847 { // cwg2847: 19 review 2024-03-01
diff --git a/clang/test/CXX/drs/cwg29xx.cpp b/clang/test/CXX/drs/cwg29xx.cpp
index 2aa52ad98ada85..f4057dbf4a3ca8 100644
--- a/clang/test/CXX/drs/cwg29xx.cpp
+++ b/clang/test/CXX/drs/cwg29xx.cpp
@@ -32,7 +32,7 @@ struct A {
void f(this void); // expected-error {{explicit object parameter cannot have 'void' type}}
};
#endif
-}
+} // namespace cwg2915
namespace cwg2917 { // cwg2917: 20 review 2024-07-30
template <typename>
@@ -52,16 +52,16 @@ struct S {
};
} // namespace cwg2917
-#if __cplusplus >= 202400L
-
+#if __cplusplus > 202302L
namespace std {
using size_t = decltype(sizeof(0));
-};
+} // namespace std
void *operator new(std::size_t, void *p) { return p; }
void* operator new[] (std::size_t, void* p) {return p;}
-
+#endif
namespace cwg2922 { // cwg2922: 20
+#if __cplusplus > 202302L
union U { int a, b; };
constexpr U nondeterministic(bool i) {
if(i) {
@@ -75,5 +75,5 @@ constexpr U nondeterministic(bool i) {
constexpr U _ = nondeterministic(true);
// expected-error at -1 {{constexpr variable '_' must be initialized by a constant expression}} \
// expected-note at -1 {{in call to 'nondeterministic(true)'}}
-}
#endif
+} // namespace cwg2922
diff --git a/clang/test/CXX/drs/cwg2xx.cpp b/clang/test/CXX/drs/cwg2xx.cpp
index 19b0685b73381d..f9010235b82473 100644
--- a/clang/test/CXX/drs/cwg2xx.cpp
+++ b/clang/test/CXX/drs/cwg2xx.cpp
@@ -30,7 +30,7 @@ namespace cwg200 { // cwg200: dup 214
void g() {
f<int>(1);
}
-}
+} // namespace cwg200
// cwg201 is in cwg201.cpp
@@ -40,7 +40,7 @@ namespace cwg202 { // cwg202: 3.1
static_assert(__enable_constant_folding(g == &f<int>), "");
};
template struct X<f>;
-}
+} // namespace cwg202
// cwg204: sup 820
@@ -52,7 +52,7 @@ namespace cwg206 { // cwg206: yes
template<typename T> void f() { S s; }
// expected-error at -1 {{variable has incomplete type 'S'}}
// expected-note@#cwg206-S {{forward declaration of 'cwg206::S'}}
-}
+} // namespace cwg206
namespace cwg207 { // cwg207: yes
class A {
@@ -67,7 +67,7 @@ namespace cwg207 { // cwg207: yes
f();
}
};
-}
+} // namespace cwg207
// cwg208 FIXME: write codegen test
@@ -80,7 +80,7 @@ namespace cwg209 { // cwg209: 3.2
// expected-error at -1 {{friend function 'f' is a private member of 'cwg209::A'}}
// expected-note@#cwg209-A-f {{implicitly declared private here}}
};
-}
+} // namespace cwg209
// cwg210 is in cwg210.cpp
@@ -93,7 +93,7 @@ namespace cwg211 { // cwg211: yes
// expected-error at -1 {{return in the catch of a function try block of a constructor is illegal}}
}
};
-}
+} // namespace cwg211
namespace cwg213 { // cwg213: yes
template <class T> struct A : T {
@@ -112,7 +112,7 @@ namespace cwg213 { // cwg213: yes
char &f(B);
template void A<B>::h(B); // #cwg213-instantiation
-}
+} // namespace cwg213
namespace cwg214 { // cwg214: yes
template<typename T, typename U> T checked_cast(U from) { U::error; }
@@ -125,7 +125,7 @@ namespace cwg214 { // cwg214: yes
void g() {
f<int>(1);
}
-}
+} // namespace cwg214
namespace cwg215 { // cwg215: 2.9
template<typename T> class X {
@@ -135,7 +135,7 @@ namespace cwg215 { // cwg215: 2.9
struct Y {
void foo() { (void)+X<Y>().n; }
};
-}
+} // namespace cwg215
namespace cwg216 { // cwg216: no
// FIXME: Should reject this: 'f' has linkage but its type does not,
@@ -151,7 +151,7 @@ namespace cwg216 { // cwg216: no
void f(E);
};
void g(S s, S::E e) { s.f(e); }
-}
+} // namespace cwg216
namespace cwg217 { // cwg217: yes
template<typename T> struct S {
@@ -159,7 +159,7 @@ namespace cwg217 { // cwg217: yes
};
template<typename T> void S<T>::f(int = 0) {}
// expected-error at -1 {{default arguments cannot be added to an out-of-line definition of a member of a class template}}
-}
+} // namespace cwg217
namespace cwg218 { // cwg218: yes
// NB: also dup 405
@@ -223,7 +223,7 @@ namespace cwg218 { // cwg218: yes
template<typename A, typename B> struct C {};
}
void testG(G::C<G::X::A, G::Y::B> gc) { f(gc); }
-}
+} // namespace cwg218
// cwg219: na
// cwg220: na
@@ -260,7 +260,7 @@ namespace cwg221 { // cwg221: 3.6
// expected-note@#cwg221-S {{candidate function (the implicit copy assignment operator) not viable: no known conversion from 'float' to 'const A' for 1st argument}}
a += f;
}
-}
+} // namespace cwg221
namespace cwg222 { // cwg222: dup 637
void f(int a, int b, int c, int *x) {
@@ -280,7 +280,7 @@ namespace cwg222 { // cwg222: dup 637
a = (b = ++a);
#pragma clang diagnostic pop
}
-}
+} // namespace cwg222
// cwg223: na
@@ -352,7 +352,7 @@ namespace cwg224 { // cwg224: 16
return i;
}
}
-}
+} // namespace cwg224
// cwg225: yes
template<typename T> void cwg225_f(T t) { cwg225_g(t); }
@@ -410,7 +410,7 @@ namespace cwg226 { // cwg226: no
template<typename, typename X, typename=void, typename Y> int foo(X, Y);
// cxx98-error at -1 {{default template arguments for a function template are a C++11 extension}}
int x = foo(0, 0);
-}
+} // namespace cwg226
void cwg227(bool b) { // cwg227: yes
if (b)
@@ -426,14 +426,14 @@ namespace cwg228 { // cwg228: yes
template <class T> struct Y {
void g(X<T> x) { x.template X<T>::f(); }
};
-}
+} // namespace cwg228
namespace cwg229 { // cwg229: 2.9
template<typename T> void f();
template<typename T> void f<T*>() {}
// expected-error at -1 {{function template partial specialization is not allowed}}
template<> void f<int>() {}
-}
+} // namespace cwg229
namespace cwg230 { // cwg230: 3.0
struct S {
@@ -442,7 +442,7 @@ namespace cwg230 { // cwg230: 3.0
// expected-note@#cwg230-f {{'f' declared here}}
virtual void f() = 0; // #cwg230-f
};
-}
+} // namespace cwg230
namespace cwg231 { // cwg231: yes
namespace outer {
@@ -454,7 +454,7 @@ namespace cwg231 { // cwg231: yes
// expected-error at -1 {{use of undeclared identifier 'i'; did you mean 'inner::i'?}}
// expected-note@#cwg231-i {{'inner::i' declared here}}
}
-}
+} // namespace cwg231
// cwg234: na
// cwg235: na
@@ -463,13 +463,13 @@ namespace cwg236 { // cwg236: 3.2
void *p = int();
// cxx98-warning at -1 {{expression which evaluates to zero treated as a null pointer constant of type 'void *'}}
// since-cxx11-error at -2 {{cannot initialize a variable of type 'void *' with an rvalue of type 'int'}}
-}
+} // namespace cwg236
namespace cwg237 { // cwg237: dup 470
template<typename T> struct A { void f() { T::error; } };
template<typename T> struct B : A<T> {};
template struct B<int>; // ok
-}
+} // namespace cwg237
namespace cwg239 { // cwg239: yes
namespace NS {
@@ -485,7 +485,7 @@ namespace cwg239 { // cwg239: yes
extern int &g(NS::T, float);
int &s = g(parm, 1);
}
-}
+} // namespace cwg239
// cwg240: dup 616
@@ -524,7 +524,7 @@ namespace cwg241 { // cwg241: yes
// expected-note@#cwg241-A-f {{candidate function template not viable: requires 0 arguments, but 1 was provided}}
g<3>(b);
}
-}
+} // namespace cwg241
namespace cwg243 { // cwg243: yes
struct B;
@@ -540,7 +540,7 @@ namespace cwg243 { // cwg243: yes
// expected-error at -1 {{conversion from 'struct B' to 'A' is ambiguous}}
// expected-note@#cwg243-A {{candidate constructor}}
// expected-note@#cwg243-B {{candidate function has been explicitly deleted}}
-}
+} // namespace cwg243
namespace cwg244 { // cwg244: 11
// NB: this test is reused by cwg399
@@ -634,7 +634,7 @@ namespace cwg244 { // cwg244: 11
}
template void g(N::S<int>::Inner *);
}
-}
+} // namespace cwg244
namespace cwg245 { // cwg245: yes
struct S {
@@ -643,7 +643,7 @@ namespace cwg245 { // cwg245: yes
// expected-error at -1 {{use of 'E' with tag type that does not match previous declaration}}
// expected-note@#cwg245-E {{previous use is here}}
};
-}
+} // namespace cwg245
namespace cwg246 { // cwg246: 3.2
struct S {
@@ -656,7 +656,7 @@ X: ;
// expected-note@#cwg246-try {{jump bypasses initialization of try block}}
}
};
-}
+} // namespace cwg246
namespace cwg247 { // cwg247: yes
struct A {};
@@ -682,16 +682,16 @@ namespace cwg247 { // cwg247: yes
void f(int);
};
void (F::*i)() = &F::f;
-}
+} // namespace cwg247
namespace cwg248 { // cwg248: sup P1949
int \u040d\u040e = 0;
-}
+} // namespace cwg248
namespace cwg249 { // cwg249: yes
template<typename T> struct X { void f(); };
template<typename T> void X<T>::f() {}
-}
+} // namespace cwg249
namespace cwg250 { // cwg250: yes
typedef void (*FPtr)(double x[]);
@@ -702,7 +702,7 @@ namespace cwg250 { // cwg250: yes
template<int I = 3> void g(double x[]);
// cxx98-error at -1 {{default template arguments for a function template are a C++11 extension}}
FPtr gp = &g<>;
-}
+} // namespace cwg250
namespace cwg252 { // cwg252: 3.1
struct A {
@@ -753,7 +753,7 @@ namespace cwg252 { // cwg252: 3.1
virtual ~G();
};
G::~G() {}
-}
+} // namespace cwg252
namespace cwg254 { // cwg254: 2.9
template<typename T> struct A {
@@ -768,7 +768,7 @@ namespace cwg254 { // cwg254: 2.9
struct C { typedef struct {} type; }; // #cwg254-C
A<B>::type n;
A<C>::type n; // #cwg254-instantiation
-}
+} // namespace cwg254
namespace cwg255 { // cwg255: yes
struct S {
@@ -795,7 +795,7 @@ namespace cwg257 { // cwg257: 3.4
// expected-note@#cwg257-A {{'cwg257::A' declared here}}
void f();
};
-}
+} // namespace cwg257
namespace cwg258 { // cwg258: 2.8
struct A {
@@ -833,7 +833,7 @@ namespace cwg258 { // cwg258: 2.8
} f;
// expected-error at -1 {{variable type 'struct F' is an abstract class}}
// expected-note@#cwg258-E-f {{unimplemented pure virtual method 'f' in 'F'}}
-}
+} // namespace cwg258
namespace cwg259 { // cwg259: 4
template<typename T> struct A {};
@@ -868,7 +868,7 @@ namespace cwg259 { // cwg259: 4
template struct B<float>;
// expected-warning at -1 {{explicit instantiation of 'B<float>' that occurs after an explicit specialization has no effect}}
// expected-note@#cwg259-B-float {{previous template specialization is here}}
-}
+} // namespace cwg259
// FIXME: When cwg260 is resolved, also add tests for CWG507.
@@ -905,14 +905,14 @@ namespace cwg261 { // cwg261: no
// expected-warning at -1 {{'operator delete' was marked unused but was used}}
#pragma clang diagnostic pop
-}
+} // namespace cwg261
namespace cwg262 { // cwg262: yes
int f(int = 0, ...);
int k = f();
int l = f(0);
int m = f(0, 0);
-}
+} // namespace cwg262
namespace cwg263 { // cwg263: 3.3
struct X {};
@@ -932,7 +932,7 @@ namespace cwg263 { // cwg263: 3.3
Y::~Y();
// expected-error at -1 {{extra qualification on member '~Y'}}
};
-}
+} // namespace cwg263
// cwg265: dup 353
// cwg266: na
@@ -948,7 +948,7 @@ namespace cwg272 { // cwg272: yes
// expected-error at -1 {{invalid argument type 'X' to unary expression}}
}
};
-}
+} // namespace cwg272
#include <stdarg.h>
#include <stddef.h>
@@ -963,7 +963,7 @@ namespace cwg273 { // cwg273: yes
va_start(val, a);
va_end(val);
}
-}
+} // namespace cwg273
// cwg274: na
@@ -1023,7 +1023,7 @@ namespace cwg275 { // cwg275: no
// expected-error at -1 {{partial ordering for explicit instantiation of 'f' is ambiguous}}
// expected-note@#cwg275-f {{explicit instantiation candidate function 'cwg275::f<short>' template here [with T = short]}}
// expected-note@#cwg275-N-f {{explicit instantiation candidate function 'cwg275::N::f<short>' template here [with T = short]}}
-}
+} // namespace cwg275
// cwg276: na
@@ -1031,7 +1031,7 @@ namespace cwg277 { // cwg277: 3.1
typedef int *intp;
int *p = intp();
static_assert(__enable_constant_folding(!intp()), "");
-}
+} // namespace cwg277
// cwg279 is in cwg279.cpp
@@ -1086,7 +1086,7 @@ namespace cwg280 { // cwg280: 2.9
// expected-note@#cwg280-B-f3 {{conversion candidate of type 'void (*)(int, int, int)'}}
// expected-note@#cwg280-C-f3 {{conversion candidate of type 'void (*)(int, int, int)'}}
}
-}
+} // namespace cwg280
namespace cwg281 { // cwg281: no
void a();
@@ -1103,7 +1103,7 @@ namespace cwg281 { // cwg281: no
friend inline void e() {}
friend inline void f() {}
};
-}
+} // namespace cwg281
namespace cwg283 { // cwg283: yes
template<typename T> // #cwg283-template
@@ -1115,7 +1115,7 @@ namespace cwg283 { // cwg283: yes
// expected-error at -1 {{declaration of 'T' shadows template parameter}}
// expected-note@#cwg283-template {{template parameter is declared here}}
};
-}
+} // namespace cwg283
namespace cwg284 { // cwg284: no
namespace A {
@@ -1153,7 +1153,7 @@ namespace cwg284 { // cwg284: no
struct D::X {}; // FIXME: ill-formed
enum D::Y e2; // ok per cwg417
class D::Z z2; // ok per cwg417
-}
+} // namespace cwg284
namespace cwg285 { // cwg285: yes
template<typename T> void f(T, int); // #cwg285-f-T-int
@@ -1162,7 +1162,7 @@ namespace cwg285 { // cwg285: yes
// expected-error at -1 {{function template specialization 'f' ambiguously refers to more than one function template; explicitly specify additional template arguments to identify a particular function template}}
// expected-note@#cwg285-f-int-T {{function template 'cwg285::f<int>' matches specialization [with T = int]}}
// expected-note@#cwg285-f-T-int {{function template 'cwg285::f<int>' matches specialization [with T = int]}}
-}
+} // namespace cwg285
namespace cwg286 { // cwg286: 2.8
template<class T> struct A {
@@ -1178,7 +1178,7 @@ namespace cwg286 { // cwg286: 2.8
A<short>::C::B<int*> absip;
// expected-error at -1 {{'B' is a private member of 'cwg286::A<short>::C'}}
// expected-note@#cwg286-B {{implicitly declared private here}}
-}
+} // namespace cwg286
// cwg288: na
@@ -1192,7 +1192,7 @@ namespace cwg289 { // cwg289: yes
// expected-error at -1 {{type 'int' cannot be used prior to '::' because it has no members}}
// expected-note@#cwg289-C-int {{in instantiation of template class 'cwg289::C<int>' requested here}}
struct D : C<int> {}; // #cwg289-C-int
-}
+} // namespace cwg289
// cwg290: na
// cwg291: dup 391
@@ -1224,7 +1224,7 @@ namespace cwg294 { // cwg294: no
// since-cxx17-error at -1 {{ISO C++17 does not allow dynamic exception specifications}}
// since-cxx17-note at -2 {{use 'noexcept(false)' instead}}
}
-}
+} // namespace cwg294
namespace cwg295 { // cwg295: 3.7
typedef int f();
@@ -1243,14 +1243,14 @@ namespace cwg295 { // cwg295: 3.7
typedef int (*V)();
typedef volatile U *V;
// expected-warning at -1 {{'volatile' qualifier on function type 'U' (aka 'int ()') has no effect}}
-}
+} // namespace cwg295
namespace cwg296 { // cwg296: yes
struct A {
static operator int() { return 0; }
// expected-error at -1 {{conversion function must be a non-static member function}}
};
-}
+} // namespace cwg296
namespace cwg298 { // cwg298: 3.1
struct A {
@@ -1289,7 +1289,7 @@ namespace cwg298 { // cwg298: 3.1
};
typedef const F G;
G::~F() {} // ok
-}
+} // namespace cwg298
namespace cwg299 { // cwg299: 2.8 c++11
struct S {
@@ -1309,4 +1309,4 @@ namespace cwg299 { // cwg299: 2.8 c++11
// since-cxx14-error-re@#cwg299-q {{{{conversion from 'T' to 'unsigned (long long|long|int)' is ambiguous}}}}
// since-cxx14-note@#cwg299-int {{candidate function}}
// since-cxx14-note@#cwg299-ushort {{candidate function}}
-}
+} // namespace cwg299
diff --git a/clang/test/CXX/drs/cwg3xx.cpp b/clang/test/CXX/drs/cwg3xx.cpp
index abe106716f6f9a..4404d92cb47dd2 100644
--- a/clang/test/CXX/drs/cwg3xx.cpp
+++ b/clang/test/CXX/drs/cwg3xx.cpp
@@ -21,7 +21,7 @@ namespace cwg300 { // cwg300: yes
template<typename R, typename A> void f(R (&)(A)) {}
int g(int);
void h() { f(g); }
-}
+} // namespace cwg300
namespace cwg301 { // cwg301: 3.5
// see also cwg38
@@ -76,7 +76,7 @@ namespace cwg301 { // cwg301: 3.5
// expected-error at -1 {{expected identifier}}
// expected-error at -2 {{declaration of anonymous class must be a definition}}
// expected-error at -3 {{declaration does not declare anything}}
-}
+} // namespace cwg301
namespace cwg302 { // cwg302: 3.0
struct A { A(); ~A(); };
@@ -109,7 +109,7 @@ namespace cwg302 { // cwg302: 3.0
const int n = 0;
} d = D();
#endif
-}
+} // namespace cwg302
// cwg303: na
@@ -124,7 +124,7 @@ namespace cwg304 { // cwg304: 2.9
int m = S().b; // #cwg304-m
// since-cxx11-error at -1 {{call to implicitly-deleted default constructor of 'S'}}
// since-cxx11-note@#cwg304-S {{default constructor of 'S' is implicitly deleted because field 'b' of reference type 'int &' would not be initialized}}
-}
+} // namespace cwg304
namespace cwg305 { // cwg305: no
struct A {
@@ -184,7 +184,7 @@ namespace cwg305 { // cwg305: no
void qr(Q::R<int> x) { x.~R<char>(); }
// expected-error at -1 {{no member named '~R' in 'cwg305::Q::R<int>'}}
#endif
-}
+} // namespace cwg305
namespace cwg306 { // cwg306: dup 39
struct A { struct B {}; };
@@ -200,7 +200,7 @@ namespace cwg306 { // cwg306: dup 39
// expected-error at -1 {{member 'X' found in multiple base classes of
diff erent types}}
// expected-note@#cwg306-X {{member type 'cwg306::X' found}}
// expected-note@#cwg306-typedef-X {{member type 'const cwg306::X' found}}
-}
+} // namespace cwg306
// cwg307: na
@@ -230,7 +230,7 @@ namespace cwg308 { // cwg308: 3.7
// get here instead
}
}
-}
+} // namespace cwg308
// cwg309: dup 485
@@ -248,7 +248,7 @@ namespace cwg311 { // cwg311: 3.0
// expected-warning at -2 {{extra qualification on member 'X'}}
// expected-error at -3 {{a type specifier is required for all declarations}}
// expected-error at -4 {{expected ';' after top level declarator}}
-}
+} // namespace cwg311
// cwg312: dup 616
@@ -257,7 +257,7 @@ namespace cwg313 { // cwg313: dup 299 c++11
// FIXME: should this be available in c++98 mode?
int *p = new int[A()];
// cxx98-error at -1 {{implicit conversion from array size expression of type 'A' to integral type 'int' is a C++11 extension}}
-}
+} // namespace cwg313
namespace cwg314 { // cwg314: no
// NB: dup 1710
@@ -293,12 +293,12 @@ namespace cwg317 { // cwg317: 3.5
inline int h();
// expected-error at -1 {{inline declaration of 'h' follows non-inline definition}}
// expected-note@#cwg317-h {{previous definition is here}}
-}
+} // namespace cwg317
namespace cwg318 { // cwg318: sup 1310
struct A {};
struct A::A a;
-}
+} // namespace cwg318
namespace cwg319 { // cwg319: no
// FIXME: dup cwg389
@@ -335,7 +335,7 @@ namespace cwg319 { // cwg319: no
extern C c; // ok
X<C> xc;
}
-}
+} // namespace cwg319
namespace cwg320 { // cwg320: yes
#if __cplusplus >= 201103L
@@ -348,7 +348,7 @@ namespace cwg320 { // cwg320: yes
constexpr unsigned g(X x) { return x.copies; }
static_assert(f(X()).copies == g(X()) + 1, "expected one extra copy for return value");
#endif
-}
+} // namespace cwg320
namespace cwg321 { // cwg321: dup 557
namespace N {
@@ -368,7 +368,7 @@ namespace cwg321 { // cwg321: dup 557
}
N::I<int> i, j;
bool x = i == j;
-}
+} // namespace cwg321
namespace cwg322 { // cwg322: 2.8
struct A {
@@ -376,7 +376,7 @@ namespace cwg322 { // cwg322: 2.8
} a;
int &r = static_cast<int&>(a);
int &s = a;
-}
+} // namespace cwg322
// cwg323: sup 820
@@ -404,12 +404,12 @@ namespace cwg324 { // cwg324: 3.6
// expected-error at -1 {{address of bit-field requested}}
int *i = &++s.n;
// expected-error at -1 {{address of bit-field requested}}
-}
+} // namespace cwg324
namespace cwg326 { // cwg326: 3.1
struct S {};
static_assert(__is_trivially_constructible(S, const S&), "");
-}
+} // namespace cwg326
namespace cwg327 { // cwg327: dup 538
struct A;
@@ -417,7 +417,7 @@ namespace cwg327 { // cwg327: dup 538
class B;
struct B {};
-}
+} // namespace cwg327
namespace cwg328 { // cwg328: yes
struct A; // #cwg328-A
@@ -430,7 +430,7 @@ namespace cwg328 { // cwg328: yes
A *p = new A[0];
// expected-error at -1 {{allocation of incomplete type 'A'}}
// expected-note@#cwg328-A {{forward declaration of 'cwg328::A'}}
-}
+} // namespace cwg328
namespace cwg329 { // cwg329: 3.5
struct B {};
@@ -450,7 +450,7 @@ namespace cwg329 { // cwg329: 3.5
void test() {
h(a); // #cwg329-h-call
}
-}
+} // namespace cwg329
namespace cwg330 { // cwg330: 7
// Conversions between P and Q will be allowed by P0388.
@@ -544,7 +544,7 @@ namespace cwg330 { // cwg330: 7
(void) reinterpret_cast<B4*>(a);
}
}
-}
+} // namespace cwg330
namespace cwg331 { // cwg331: 11
struct A {
@@ -556,7 +556,7 @@ namespace cwg331 { // cwg331: 11
const A b(a);
// expected-error at -1 {{no matching constructor for initialization of 'const A'}}
// expected-note@#cwg331-A-ctor {{candidate constructor not viable: 1st argument ('const A') would lose const qualifier}}
-}
+} // namespace cwg331
namespace cwg332 { // cwg332: dup 577
void f(volatile void);
@@ -567,14 +567,14 @@ namespace cwg332 { // cwg332: dup 577
void h(int n, volatile void);
// expected-error at -1 {{'void' must be the first and only parameter if specified}}
// cxx20-23-warning at -2 {{volatile-qualified parameter type 'volatile void' is deprecated}}
-}
+} // namespace cwg332
namespace cwg333 { // cwg333: yes
int n = 0;
int f(int(n));
int g((int(n)));
int h = f(g);
-}
+} // namespace cwg333
namespace cwg334 { // cwg334: yes
template<typename T> void f() {
@@ -586,7 +586,7 @@ namespace cwg334 { // cwg334: yes
friend void f(S);
};
template void f<S>();
-}
+} // namespace cwg334
// cwg335: sup 820
@@ -620,7 +620,7 @@ namespace cwg336 { // cwg336: yes
template<class Y> template<> void A<Y>::B<double>::mf2() {}
// expected-error at -1 {{nested name specifier 'A<Y>::B<double>::' for declaration does not refer into a class, class template or class template partial specialization}}
}
-}
+} // namespace cwg336
namespace cwg337 { // cwg337: yes
template<typename T> void f(T (*)[1]);
@@ -636,7 +636,7 @@ namespace cwg337 { // cwg337: yes
int &s = f<B>(0);
// expected-error at -1 {{non-const lvalue reference to type 'int' cannot bind to a temporary of type 'void'}}
struct B { virtual ~B() = 0; };
-}
+} // namespace cwg337
// cwg338: dup 1884
@@ -671,14 +671,14 @@ namespace cwg339 { // cwg339: 2.8
static_assert(conv_int<char>::value, "");
bool b = conv_int2<char>(A<1>());
A<1> c = make_A<char>();
-}
+} // namespace cwg339
namespace cwg340 { // cwg340: yes
struct A { A(int); };
struct B { B(A, A, int); };
int x, y;
B b(A(x), A(y), 3);
-}
+} // namespace cwg340
namespace cwg341 { // cwg341: sup 1708
namespace A {
@@ -712,7 +712,7 @@ namespace cwg341 {
namespace B { extern "C" void cwg341_e(); }
// expected-error at -1 {{redefinition of 'cwg341_e' as
diff erent kind of symbol}}
// expected-note@#cwg341_e {{previous definition is here}}
-}
+} // namespace cwg341
// cwg342: na
@@ -727,12 +727,12 @@ namespace cwg343 { // cwg343: no
C() : A<T>::B<T>() {}
// expected-error at -1 {{use 'template' keyword to treat 'B' as a dependent template name}}
};
-}
+} // namespace cwg343
namespace cwg344 { // cwg344: dup 1435
struct A { inline virtual ~A(); };
struct B { friend A::~A(); };
-}
+} // namespace cwg344
namespace cwg345 { // cwg345: yes
struct A {
@@ -750,7 +750,7 @@ namespace cwg345 { // cwg345: yes
f(b);
f(a); // #cwg345-f-a
}
-}
+} // namespace cwg345
// cwg346: na
@@ -774,7 +774,7 @@ namespace cwg347 { // cwg347: yes
void derived::g() {}
// expected-error at -1 {{out-of-line definition of 'g' does not match any declaration in 'cwg347::derived'}}
// expected-note@#cwg347-derived {{defined here}}
-}
+} // namespace cwg347
// cwg348: na
@@ -803,7 +803,7 @@ namespace cwg349 { // cwg349: no
// FIXME: This is invalid.
B b;
const int *const *const *p2 = b;
-}
+} // namespace cwg349
// cwg351: na
@@ -945,7 +945,7 @@ namespace cwg352 { // cwg352: 2.8
f(a1, a2);
}
}
-}
+} // namespace cwg352
// cwg353 needs an IRGen test.
@@ -1005,12 +1005,14 @@ namespace cwg354 { // cwg354: yes c++11
// cxx11-14-error@#cwg354-m3 {{null non-type template argument of type 'int *' does not match template parameter of type 'int S::*'}}
// cxx11-14-note@#cwg354-ptr_mem {{template parameter is declared here}}
// since-cxx17-error@#cwg354-m3 {{value of type 'int *' is not implicitly convertible to 'int S::*'}}
-}
+} // namespace cwg354
struct cwg355_S; // cwg355: yes
struct ::cwg355_S {};
// expected-warning at -1 {{extra qualification on member 'cwg355_S'}}
-namespace cwg355 { struct ::cwg355_S s; }
+namespace cwg355 {
+struct ::cwg355_S s;
+} // namespace cwg355
// cwg356: na
@@ -1029,7 +1031,7 @@ namespace cwg357 { // cwg357: yes
template<typename T> void B::f() const {}
// expected-error at -1 {{out-of-line definition of 'f' does not match any declaration in 'cwg357::B'}}
// expected-note@#cwg357-B {{defined here}}
-}
+} // namespace cwg357
namespace cwg358 { // cwg358: yes
extern "C" void cwg358_f();
@@ -1037,7 +1039,7 @@ namespace cwg358 { // cwg358: yes
int var;
extern "C" void cwg358_f() { var = 10; }
}
-}
+} // namespace cwg358
namespace cwg359 { // cwg359: yes
// Note, the example in the DR is wrong; it doesn't contain an anonymous
@@ -1066,7 +1068,7 @@ namespace cwg359 { // cwg359: yes
};
};
};
-}
+} // namespace cwg359
namespace cwg360 { // cwg360: yes
struct A {
@@ -1111,7 +1113,7 @@ namespace cwg364 { // cwg364: yes
// expected-error at -1 {{call to non-static member function without an object argument}}
S::f(0);
}
-}
+} // namespace cwg364
// cwg366: yes
#if "foo" // expected-error {{invalid token at start of a preprocessor expression}}
@@ -1125,8 +1127,7 @@ namespace cwg367 { // cwg367: yes
// expected-error at -1 {{expression is not an integral constant expression}}
// expected-note at -2 {{read of uninitialized object is not allowed in a constant expression}}
static_assert(__enable_constant_folding(true ? 4 : *new int), "");
-
-}
+} // namespace cwg367
namespace cwg368 { // cwg368: 3.6
template<typename T, T> struct S {}; // #cwg368-S
@@ -1143,7 +1144,7 @@ namespace cwg368 { // cwg368: 3.6
// cxx20-23-error@#cwg368-g-call {{call to 'g' is ambiguous}}
// cxx20-23-note@#cwg368-g {{candidate function [with T = cwg368::X]}}
// cxx20-23-note@#cwg368-g-2 {{candidate function [with T = cwg368::X]}}
-}
+} // namespace cwg368
// cwg370: na
@@ -1249,7 +1250,7 @@ namespace cwg372 { // cwg372: no
// expected-error at -1 {{'B' is a protected member of 'cwg372::badwolf::A'}}
// expected-note@#cwg372-B {{declared protected here}}
}
-}
+} // namespace cwg372
namespace cwg373 { // cwg373: 5
namespace X { int cwg373; }
@@ -1271,7 +1272,7 @@ namespace cwg373 { // cwg373: 5
using namespace A::B;
// expected-error at -1 {{expected namespace name}}
// expected-note@#cwg373-A {{'A' declared here}}
-}
+} // namespace cwg373
namespace cwg374 { // cwg374: 7
// NB 2.9 c++11
@@ -1282,7 +1283,7 @@ namespace cwg374 { // cwg374: 7
template<> void N::f<char>() {}
template<> void N::A<char>::f() {}
template<> struct N::A<int> {};
-}
+} // namespace cwg374
// cwg375: dup 345
// cwg376: na
@@ -1296,7 +1297,7 @@ namespace cwg377 { // cwg377: yes
// cxx98-error at -1 {{'long long' is a C++11 extension}}
// cxx98-error at -2 {{'long long' is a C++11 extension}}
};
-}
+} // namespace cwg377
// cwg378: dup 276
// cwg379: na
@@ -1319,7 +1320,7 @@ namespace cwg381 { // cwg381: yes
F f;
f.A::a = 1;
}
-}
+} // namespace cwg381
namespace cwg382 { // cwg382: yes c++11
// FIXME: Should we allow this in C++98 mode?
@@ -1330,7 +1331,7 @@ namespace cwg382 { // cwg382: yes c++11
// cxx98-error at -1 {{'typename' occurs outside of a template}}
typename A b;
// expected-error at -1 {{expected a qualified name after 'typename'}}
-}
+} // namespace cwg382
namespace cwg383 { // cwg383: yes
struct A { A &operator=(const A&); };
@@ -1338,7 +1339,7 @@ namespace cwg383 { // cwg383: yes
union C { C &operator=(const C&); };
union D { ~D(); };
static_assert(!__is_pod(A) && !__is_pod(B) && !__is_pod(C) && !__is_pod(D), "");
-}
+} // namespace cwg383
namespace cwg384 { // cwg384: yes
namespace N1 {
@@ -1360,7 +1361,7 @@ namespace cwg384 { // cwg384: yes
N1::X<N2::Z> v;
v.f(0);
}
-}
+} // namespace cwg384
namespace cwg385 { // cwg385: 2.8
struct A { protected: void f(); };
@@ -1375,7 +1376,7 @@ namespace cwg385 { // cwg385: 2.8
// expected-error at -1 {{'n' is a protected member of 'cwg385::D'}}
// expected-note@#cwg385-E {{constrained by protected inheritance here}}
// expected-note@#cwg385-n {{member is declared here}}
-}
+} // namespace cwg385
namespace cwg386 { // cwg386: no
namespace example1 {
@@ -1483,7 +1484,7 @@ namespace cwg387 { // cwg387: 2.8
// expected-error at -1 {{use of undeclared identifier 'gcd'}}
}
}
-}
+} // namespace cwg387
// FIXME: cwg388 needs libc++abi test
@@ -1607,7 +1608,7 @@ namespace cwg389 { // cwg389: no
// FIXME: This is ill-formed.
extern WithoutLinkage1 withoutLinkageLocal;
}
-}
+} // namespace cwg389
namespace cwg390 { // cwg390: 3.3
template<typename T>
@@ -1626,7 +1627,7 @@ namespace cwg390 { // cwg390: 3.3
struct B : A<int> { // #cwg390-A-int
void f() {}
} b;
-}
+} // namespace cwg390
namespace cwg391 { // cwg391: 2.8 c++11
// FIXME: Should this apply to C++98 too?
@@ -1649,7 +1650,7 @@ namespace cwg391 { // cwg391: 2.8 c++11
};
C<int> fc();
const C<int> &c = fc();
-}
+} // namespace cwg391
// cwg392 is in cwg392.cpp
@@ -1719,7 +1720,7 @@ namespace cwg395 { // cwg395: 3.0
template<class T, class U> operator ptr_mem_fun_t<T, U>() const { return 0; };
} null2;
int (S::*q)() = null2;
-}
+} // namespace cwg395
namespace cwg396 { // cwg396: yes
void f() {
@@ -1732,7 +1733,7 @@ namespace cwg396 { // cwg396: yes
// expected-error at -2 {{redefinition of 'i'}}
// expected-note@#cwg396-i {{previous definition is here}}
}
-}
+} // namespace cwg396
// cwg397: sup 1823
@@ -1779,7 +1780,7 @@ namespace cwg398 { // cwg398: yes
// expected-note@#cwg398-h {{candidate template ignored: substitution failure [with T = D]: 'TT' following the 'template' keyword does not refer to a template}}
}
}
-}
+} // namespace cwg398
namespace cwg399 { // cwg399: 11
// NB: reuse cwg244 test
@@ -1873,4 +1874,4 @@ namespace cwg399 { // cwg399: 11
}
template void g(N::S<int>::Inner *);
}
-}
+} // namespace cwg399
diff --git a/clang/test/CXX/drs/cwg492.cpp b/clang/test/CXX/drs/cwg492.cpp
index 7fc46b04d72bd3..caa27cf8cc714b 100644
--- a/clang/test/CXX/drs/cwg492.cpp
+++ b/clang/test/CXX/drs/cwg492.cpp
@@ -16,7 +16,7 @@ namespace std {
struct type_info {
const char* name() const NOTHROW;
};
-}
+} // namespace std
namespace cwg492 { // cwg492: 2.7
diff --git a/clang/test/CXX/drs/cwg4xx.cpp b/clang/test/CXX/drs/cwg4xx.cpp
index 825065840f1181..8c9f9e4ccb0851 100644
--- a/clang/test/CXX/drs/cwg4xx.cpp
+++ b/clang/test/CXX/drs/cwg4xx.cpp
@@ -36,7 +36,7 @@ namespace cwg400 { // cwg400: yes
// expected-error at -1 {{member 'a' found in multiple base classes of
diff erent types}}
// expected-note@#cwg400-A {{member type 'cwg400::A::a' found by ambiguous name lookup}}
// expected-note@#cwg400-B {{member type 'cwg400::B::a' found by ambiguous name lookup}}
-}
+} // namespace cwg400
namespace cwg401 { // cwg401: 2.8
template<class T, class U = typename T::type> class A : public T {}; // #cwg401-A
@@ -87,7 +87,7 @@ namespace cwg401 { // cwg401: 2.8
void g(B b) { f(b); } // #cwg402-f-b
// since-cxx11-error at -1 {{no matching function for call to 'f'}}
// since-cxx11-note@#cwg402-f {{candidate template ignored: substitution failure [with T = B, U = typename B::type]: 'type' is a protected member of 'cwg401::B'}}
-}
+} // namespace cwg401
namespace cwg403 { // cwg403: yes
namespace A {
@@ -101,7 +101,7 @@ namespace cwg403 { // cwg403: yes
// referring to an elaborated-type-specifier naming a
// injected-class-name, which is about as far from a
// template-id as we can make it.
-}
+} // namespace cwg403
// cwg404: na
// (NB: also sup 594)
@@ -148,7 +148,7 @@ namespace cwg405 { // cwg405: yes
}
void testE(E::S es) { f(es); }
// expected-error at -1 {{use of undeclared identifier 'f'}}
-}
+} // namespace cwg405
namespace cwg406 { // cwg406: 2.9
typedef struct {
@@ -159,7 +159,7 @@ namespace cwg406 { // cwg406: 2.9
static int n;
// expected-error at -1 {{static data member 'n' not allowed in anonymous union}}
} B;
-}
+} // namespace cwg406
namespace cwg407 { // cwg407: 3.8
// NB: reused by cwg1894 and cwg2199
@@ -219,7 +219,7 @@ namespace cwg407 { // cwg407: 3.8
struct S s;
}
}
-}
+} // namespace cwg407
namespace cwg408 { // cwg408: 3.4
template<int N> void g() { static_assert(N != 1, ""); }
@@ -248,7 +248,7 @@ namespace cwg408 { // cwg408: 3.4
}
template<> int R<int>::arr[2];
template void R<int>::f();
-}
+} // namespace cwg408
namespace cwg409 { // cwg409: yes
template<typename T> struct A {
@@ -259,7 +259,7 @@ namespace cwg409 { // cwg409: yes
A<T*>::B b4;
// cxx98-17-error at -1 {{missing 'typename' prior to dependent type name A<T *>::B; implicit 'typename' is a C++20 extension}}
};
-}
+} // namespace cwg409
namespace cwg410 { // cwg410: no
template<class T> void f(T);
@@ -286,7 +286,7 @@ namespace cwg410 { // cwg410: no
void g(int) { M::A::z(); }
// expected-error at -1 {{'z' is a private member of 'cwg410::M::A'}}
// expected-note@#cwg410-z {{declared private here}}
-}
+} // namespace cwg410
// cwg412 is in cwg412.cpp
@@ -309,7 +309,7 @@ namespace cwg413 { // cwg413: yes
T t2 = { 1, 2 };
// expected-error at -1 {{initializer for aggregate with no elements requires explicit braces}}
// expected-note@#cwg413-T {{'cwg413::T' declared here}}
-}
+} // namespace cwg413
namespace cwg414 { // cwg414: dup 305
struct X {};
@@ -318,13 +318,13 @@ namespace cwg414 { // cwg414: dup 305
struct X {};
x.~X();
}
-}
+} // namespace cwg414
namespace cwg415 { // cwg415: yes
template<typename T> void f(T, ...) { T::error; }
void f(int, int);
void g() { f(0, 0); } // ok
-}
+} // namespace cwg415
namespace cwg416 { // cwg416: yes
extern struct A a;
@@ -332,7 +332,7 @@ namespace cwg416 { // cwg416: yes
int &k = a + a;
struct A { float &operator+(A&); };
float &f = a + a;
-}
+} // namespace cwg416
namespace cwg417 { // cwg417: no
struct A;
@@ -367,7 +367,7 @@ namespace cwg417 { // cwg417: no
struct cwg417::H {};
// expected-error at -1 {{cannot define or redeclare 'H' here because namespace 'M' does not enclose namespace 'cwg417'}}
}
-}
+} // namespace cwg417
namespace cwg418 { // cwg418: no
namespace example1 {
@@ -464,7 +464,7 @@ namespace cwg420 { // cwg420: 9
q->A::template id<int>::~id<int>();
}
#endif
-}
+} // namespace cwg420
namespace cwg421 { // cwg421: yes
struct X { X(); int n; int &r; };
@@ -472,7 +472,7 @@ namespace cwg421 { // cwg421: yes
// cxx98-error at -1 {{taking the address of a temporary object of type 'int'}}
// since-cxx11-error at -2 {{cannot take the address of an rvalue of type 'int'}}
int *q = &X().r;
-}
+} // namespace cwg421
namespace cwg422 { // cwg422: yes
template<typename T, typename U> void f() {
@@ -484,12 +484,12 @@ namespace cwg422 { // cwg422: yes
}
template void f<int, int>();
template void f<int, char>(); // #cwg422-f-int-char
-}
+} // namespace cwg422
namespace cwg423 { // cwg423: yes
template<typename T> struct X { operator T&(); };
void f(X<int> x) { x += 1; }
-}
+} // namespace cwg423
namespace cwg424 { // cwg424: yes
struct A {
@@ -519,7 +519,7 @@ namespace cwg424 { // cwg424: yes
// expected-error at -1 {{redefinition of 'M'}}
// expected-note@#cwg424-M {{previous definition is here}}
};
-}
+} // namespace cwg424
namespace cwg425 { // cwg425: yes
struct A { template<typename T> operator T() const; } a;
@@ -535,7 +535,7 @@ namespace cwg425 { // cwg425: yes
// cxx98-error at -1 {{default template arguments for a function template are a C++11 extension}}
} b;
float g = 1.0f * b; // ok
-}
+} // namespace cwg425
namespace cwg427 { // cwg427: yes
struct B {};
@@ -551,7 +551,7 @@ namespace cwg427 { // cwg427: yes
const D &d4(b);
// expected-error at -1 {{conversion function from 'B' to 'const D' invokes a deleted function}}
// expected-note@#cwg427-D {{'D' has been explicitly marked deleted here}}
-}
+} // namespace cwg427
namespace cwg428 { // cwg428: yes
template<typename T> T make();
@@ -577,7 +577,7 @@ namespace cwg428 { // cwg428: yes
// expected-error at -1 {{cannot throw}}
// expected-note@#cwg428-X {{forward declaration of 'cwg428::X'}}
}
-}
+} // namespace cwg428
namespace cwg429 { // cwg429: 2.8 c++11
// FIXME: This rule is obviously intended to apply to C++98 as well.
@@ -592,7 +592,7 @@ namespace cwg429 { // cwg429: 2.8 c++11
static void operator delete(void*);
static void operator delete(void*, size_t);
} *b = new (0) B; // ok, second delete is not a non-placement deallocation function
-}
+} // namespace cwg429
namespace cwg430 { // cwg430: yes c++11
// resolved by n2239
@@ -601,7 +601,7 @@ namespace cwg430 { // cwg430: yes c++11
int a[] = { n++, n++, n++ };
// cxx98-warning at -1 {{multiple unsequenced modifications to 'n'}}
}
-}
+} // namespace cwg430
namespace cwg431 { // cwg431: yes
struct A {
@@ -633,7 +633,7 @@ namespace cwg431 { // cwg431: yes
// expected-error at -1 {{use 'template' keyword to treat 'get' as a dependent template name}}
c->template get<int>();
}
-}
+} // namespace cwg431
namespace cwg432 { // cwg432: 3.0
template<typename T> struct A {};
@@ -646,7 +646,7 @@ namespace cwg432 { // cwg432: 3.0
// since-cxx11-error at -1 {{use of class template 'D' requires template arguments}}
// since-cxx11-note at -2 {{template is declared here}}
#endif
-}
+} // namespace cwg432
namespace cwg433 { // cwg433: yes
template<class T> struct S {
@@ -656,7 +656,7 @@ namespace cwg433 { // cwg433: yes
template<class T> void S<T>::f(union U*) {}
S<int> s;
-}
+} // namespace cwg433
namespace cwg434 { // cwg434: sup 2352
void f() {
@@ -674,7 +674,7 @@ namespace cwg434 { // cwg434: sup 2352
const int * const &rcpci = pi;
static_assert(&rcpci == &pi, "");
#endif
-}
+} // namespace cwg434
// cwg435: na
@@ -683,7 +683,7 @@ namespace cwg436 { // cwg436: yes
void f();
// expected-error at -1 {{redefinition of 'f' as
diff erent kind of symbol}}
// expected-note@#cwg436-f {{previous definition is here}}
-}
+} // namespace cwg436
namespace cwg437 { // cwg437: sup 1308
// This is superseded by 1308, which is in turn superseded by 1330,
@@ -702,7 +702,7 @@ namespace cwg437 { // cwg437: sup 1308
// since-cxx17-note at -2 {{use 'noexcept(false)' instead}}
struct U {};
};
-}
+} // namespace cwg437
// cwg438 is in cwg438.cpp
// cwg439 is in cwg439.cpp
@@ -728,7 +728,7 @@ namespace cwg444 { // cwg444: yes
// since-cxx11-note@#cwg444-B {{candidate function (the implicit move assignment operator) not viable: expects an rvalue for 1st argument}}
// since-cxx11-note@#cwg444-D {{candidate function (the implicit move assignment operator) not viable: expects an rvalue for 1st argument}}
}
-}
+} // namespace cwg444
namespace cwg445 { // cwg445: 3.2
class A { void f(); }; // #cwg445-f
@@ -737,7 +737,7 @@ namespace cwg445 { // cwg445: 3.2
// expected-error at -1 {{friend function 'f' is a private member of 'cwg445::A'}}
// expected-note@#cwg445-f {{implicitly declared private here}}
};
-}
+} // namespace cwg445
namespace cwg446 { // cwg446: 2.8
struct C;
@@ -771,7 +771,7 @@ namespace cwg446 { // cwg446: 2.8
// cxx98-14-error at -1 {{call to deleted constructor of 'A'}}
// cxx98-14-note@#cwg446-deleted {{'A' has been explicitly marked deleted here}}
}
-}
+} // namespace cwg446
namespace cwg447 { // cwg447: yes
struct A { int n; int a[4]; };
@@ -799,7 +799,7 @@ namespace cwg447 { // cwg447: yes
// expected-error at -1 {{expected ';' after expression}}
// expected-error at -2 {{use of undeclared identifier 'd'}}
}
-}
+} // namespace cwg447
namespace cwg448 { // cwg448: 2.8
template<typename T = int> void f(int); // #cwg448-f-int
@@ -817,7 +817,7 @@ namespace cwg448 { // cwg448: 2.8
namespace HideFromADL { struct X {}; }
template void g(int); // ok
template void g(HideFromADL::X); // #cwg448-g
-}
+} // namespace cwg448
// cwg449: na
@@ -840,7 +840,7 @@ namespace cwg450 { // cwg450: yes
// expected-note@#cwg450-f2 {{candidate function not viable: expects an lvalue for 1st argument}}
}
#endif
-}
+} // namespace cwg450
namespace cwg451 { // cwg451: yes
const int a = 1 / 0;
@@ -851,7 +851,7 @@ namespace cwg451 { // cwg451: yes
// expected-error at -1 {{expression is not an integral constant expression}}
// expected-note at -2 {{initializer of 'b' is not a constant expression}}
// expected-note@#cwg451-b {{declared here}}
-}
+} // namespace cwg451
namespace cwg452 { // cwg452: yes
struct A {
@@ -860,7 +860,7 @@ namespace cwg452 { // cwg452: yes
int f();
A() : a(f()), b(this->f() + a), c(this->a), p(this) {}
};
-}
+} // namespace cwg452
// cwg454 FIXME write a codegen test
@@ -875,7 +875,7 @@ namespace cwg456 { // cwg456: yes
void *q = f;
// cxx98-warning at -1 {{initialization of pointer of type 'void *' to null from a constant boolean}}
// since-cxx11-error at -2 {{cannot initialize a variable of type 'void *' with an lvalue of type 'const bool'}}
-}
+} // namespace cwg456
namespace cwg457 { // cwg457: yes
const int a = 1;
@@ -891,7 +891,7 @@ namespace cwg457 { // cwg457: yes
// expected-error at -1 {{expression is not an integral constant expression}}
// expected-note at -2 {{read of volatile-qualified type 'const volatile int' is not allowed in a constant expression}}
};
-}
+} // namespace cwg457
namespace cwg458 { // cwg458: 11
struct A {
@@ -932,7 +932,7 @@ namespace cwg458 { // cwg458: 11
// expected-error at -1 {{'T' does not refer to a value}}
// expected-note@#cwg458-h-T {{declared here}}
}
-}
+} // namespace cwg458
namespace cwg460 { // cwg460: yes
namespace X { namespace Q { int n; } }
@@ -946,7 +946,7 @@ namespace cwg460 { // cwg460: yes
// expected-error at -1 {{using declaration cannot refer to a namespace}}
// expected-note at -2 {{did you mean 'using namespace'?}}
}
-}
+} // namespace cwg460
// cwg461: na
// cwg462 is in cwg462.cpp
@@ -983,7 +983,7 @@ void g(int a, CI b, VI c) {
c.CI::~CI();
c.VI::~VI();
}
-}
+} // namespace cwg466
namespace cwg467 { // cwg467: yes
int stuff();
@@ -1005,7 +1005,7 @@ namespace cwg467 { // cwg467: yes
later:
return k;
}
-}
+} // namespace cwg467
namespace cwg468 { // cwg468: yes c++11
// FIXME: Should we allow this in C++98 too?
@@ -1017,7 +1017,7 @@ namespace cwg468 { // cwg468: yes c++11
int k = cwg468::template A<int>::template B<char>::C;
// cxx98-error at -1 {{'template' keyword outside of a template}}
// cxx98-error at -2 {{'template' keyword outside of a template}}
-}
+} // namespace cwg468
namespace cwg469 { // cwg469: no
template<typename T> struct X; // #cwg469-X
@@ -1025,7 +1025,7 @@ namespace cwg469 { // cwg469: no
X<int&> x;
// expected-error at -1 {{implicit instantiation of undefined template 'cwg469::X<int &>'}}
// expected-note@#cwg469-X {{template is declared here}}
-}
+} // namespace cwg469
namespace cwg470 { // cwg470: yes
template<typename T> struct A {
@@ -1042,7 +1042,7 @@ namespace cwg470 { // cwg470: yes
// ok, instantiating C<char> doesn't instantiate base class members.
template struct A<char>;
template struct C<char>;
-}
+} // namespace cwg470
namespace cwg471 { // cwg471: 2.8
struct A { int n; };
@@ -1060,7 +1060,7 @@ namespace cwg471 { // cwg471: 2.8
struct H : B, G { int f() { return n; } };
// expected-error at -1 {{'n' is a private member of 'cwg471::G'}}
// expected-note@#cwg471-G-using {{declared private here}}
-}
+} // namespace cwg471
namespace cwg472 { // cwg472: no drafting 2011-04
struct B {
@@ -1077,7 +1077,7 @@ struct D : public I {
bp->i = 5;
}
};
-}
+} // namespace cwg472
namespace cwg474 { // cwg474: 3.4
namespace N {
@@ -1094,7 +1094,7 @@ namespace cwg474 { // cwg474: 3.4
// expected-error at -1 {{functions that
diff er only in their return type cannot be overloaded}}
// expected-note@#cwg474-g {{previous declaration is here}}
}
-}
+} // namespace cwg474
// cwg475 FIXME write a libc++abi test
@@ -1113,7 +1113,7 @@ namespace cwg477 { // cwg477: 3.5
// expected-error at -1 {{can only be specified inside the class definition}}
virtual void A::f() {}
// expected-error at -1 {{can only be specified inside the class definition}}
-}
+} // namespace cwg477
namespace cwg478 { // cwg478: yes
struct A { virtual void f() = 0; }; // #cwg478-f
@@ -1121,7 +1121,7 @@ namespace cwg478 { // cwg478: yes
void f(A a[10]);
// expected-error at -1 {{array of abstract class type 'A'}}
// expected-note@#cwg478-f {{unimplemented pure virtual method 'f' in 'A'}}
-}
+} // namespace cwg478
namespace cwg479 { // cwg479: 2.8
struct S {
@@ -1162,7 +1162,7 @@ namespace cwg479 { // cwg479: 2.8
// expected-note@#cwg479-S-dtor {{declared private here}}
}
}
-}
+} // namespace cwg479
namespace cwg480 { // cwg480: yes
struct A { int n; };
@@ -1187,7 +1187,7 @@ namespace cwg480 { // cwg480: yes
A &j = i;
D &k = static_cast<D&>(j);
// expected-error at -1 {{cannot cast 'A' to 'D &' via virtual base 'cwg480::B'}}
-}
+} // namespace cwg480
namespace cwg481 { // cwg481: 2.8
template<class T, T U> class A { T *x; };
@@ -1232,7 +1232,7 @@ namespace cwg481 { // cwg481: 2.8
template<N X, typename N, template<N Y> class T> struct I;
template<char*> struct J;
I<123, char*, J> *j;
-}
+} // namespace cwg481
namespace cwg482 { // cwg482: 3.5
extern int a;
@@ -1277,7 +1277,7 @@ namespace cwg482 { // cwg482: 3.5
// expected-error at -1 {{extra qualification on member 'C'}}
#endif
};
-}
+} // namespace cwg482
namespace cwg483 { // cwg483: yes
namespace climits {
@@ -1294,7 +1294,7 @@ namespace cwg483 { // cwg483: yes
static_assert(__WCHAR_WIDTH__ >= 8, "");
static_assert(__WINT_WIDTH__ >= 16, "");
}
-}
+} // namespace cwg483
namespace cwg484 { // cwg484: yes
struct A {
@@ -1332,7 +1332,7 @@ namespace cwg484 { // cwg484: yes
S();
// expected-error at -1 {{a type specifier is required for all declarations}}
} S;
-}
+} // namespace cwg484
namespace cwg485 { // cwg485: yes
namespace N {
@@ -1345,7 +1345,7 @@ namespace cwg485 { // cwg485: yes
N::S s;
int a = operator+(s, s);
int b = f<int>(s);
-}
+} // namespace cwg485
namespace cwg486 { // cwg486: yes
template<typename T> T f(T *); // #cwg486-f
@@ -1364,7 +1364,7 @@ namespace cwg486 { // cwg486: yes
// expected-error at -1 {{no matching function for call to 'f'}}
// expected-note@#cwg486-f {{candidate template ignored: substitution failure [with T = int[10]]: function cannot return array type 'int[10]'}}
}
-}
+} // namespace cwg486
namespace cwg487 { // cwg487: yes
enum E { e };
@@ -1373,7 +1373,7 @@ namespace cwg487 { // cwg487: yes
// expected-error at -1 {{expression is not an integral constant expression}}
// since-cxx11-note at -2 {{non-constexpr function 'operator+' cannot be used in a constant expression}}
// since-cxx11-note@#cwg487-operator-plus {{declared here}}
-}
+} // namespace cwg487
namespace cwg488 { // cwg488: yes c++11
template <typename T> void f(T);
@@ -1387,7 +1387,7 @@ namespace cwg488 { // cwg488: yes c++11
f(e);
// cxx98-error at -1 {{template argument uses local type 'E'}}
}
-}
+} // namespace cwg488
// cwg489: na
@@ -1433,13 +1433,13 @@ namespace cwg490 { // cwg490: 2.8
// the class of the conversion function first.
friend A::operator X<T>();
};
-}
+} // namespace cwg490
namespace cwg491 { // cwg491: dup 413
struct A {} a, b[3] = { a, {} };
A c[2] = { a, {}, b[1] };
// expected-error at -1 {{excess elements in array initializer}}
-}
+} // namespace cwg491
// cwg492 is in cwg492.cpp
@@ -1451,7 +1451,7 @@ namespace cwg493 { // cwg493: dup 976
if (X()) {
}
}
-}
+} // namespace cwg493
namespace cwg494 { // cwg494: dup 372
class A {
@@ -1464,7 +1464,7 @@ namespace cwg494 { // cwg494: dup 372
A::B y;
};
};
-}
+} // namespace cwg494
namespace cwg495 { // cwg495: 3.5
template<typename T>
@@ -1482,7 +1482,7 @@ namespace cwg495 { // cwg495: 3.5
};
S2<int> s2;
long n2 = s2;
-}
+} // namespace cwg495
namespace cwg496 { // cwg496: sup 2094
struct A { int n; };
@@ -1494,7 +1494,7 @@ namespace cwg496 { // cwg496: sup 2094
static_assert(__is_trivially_constructible(B, const B&), "");
static_assert(__is_trivially_assignable(A, const A&), "");
static_assert(__is_trivially_assignable(B, const B&), "");
-}
+} // namespace cwg496
namespace cwg497 { // cwg497: sup 253
void before() {
@@ -1517,9 +1517,9 @@ namespace cwg497 { // cwg497: sup 253
cs.*pm = 88;
// expected-error at -1 {{read-only variable is not assignable}}
}
-}
+} // namespace cwg497
namespace cwg499 { // cwg499: yes
extern char str[];
void f() { throw str; }
-}
+} // namespace cwg499
diff --git a/clang/test/CXX/drs/cwg571.cpp b/clang/test/CXX/drs/cwg571.cpp
index 9f0f455fb72760..09d12e1197b5ec 100644
--- a/clang/test/CXX/drs/cwg571.cpp
+++ b/clang/test/CXX/drs/cwg571.cpp
@@ -12,7 +12,7 @@ namespace cwg571 { // cwg571: 2.7
const ir r = n;
// expected-warning at -1 {{'const' qualifier on reference type 'ir' (aka 'int &') has no effect}}
ir r2 = n;
-}
+} // namespace cwg571
// Entities have external linkage by default.
diff --git a/clang/test/CXX/drs/cwg5xx.cpp b/clang/test/CXX/drs/cwg5xx.cpp
index 9219a4c857b12b..2e78138fd123f4 100644
--- a/clang/test/CXX/drs/cwg5xx.cpp
+++ b/clang/test/CXX/drs/cwg5xx.cpp
@@ -20,13 +20,13 @@ void *operator new(size_t); // #cwg5xx-global-operator-new
#if __cplusplus > 201402L
namespace std {
enum class align_val_t : size_t {};
-}
+} // namespace std
void *operator new(size_t, std::align_val_t); // #cwg5xx-global-operator-new-aligned
#endif
namespace std {
struct type_info;
-}
+} // namespace std
namespace cwg500 { // cwg500: dup 372
class D;
@@ -38,7 +38,7 @@ namespace cwg500 { // cwg500: dup 372
class A::B {};
class A::C : public A::B {};
class D : public A::B {};
-}
+} // namespace cwg500
namespace cwg501 { // cwg501: yes
struct A {
@@ -48,7 +48,7 @@ namespace cwg501 { // cwg501: yes
// expected-error at -1 {{use of undeclared identifier 'f'}}
}
};
-}
+} // namespace cwg501
namespace cwg502 { // cwg502: yes
struct Q {};
@@ -63,7 +63,7 @@ namespace cwg502 { // cwg502: yes
int f(A<int>::E);
template<int N> int f(Q (&)[N]);
template struct A<int>;
-}
+} // namespace cwg502
namespace cwg505 { // cwg505: yes
const char *exts = "\e\(\{\[\%";
@@ -74,7 +74,7 @@ namespace cwg505 { // cwg505: yes
// expected-error at -5 {{use of non-standard escape character '\%'}}
const char *unknown = "\Q";
// expected-error at -1 {{unknown escape sequence '\Q'}}
-}
+} // namespace cwg505
namespace cwg506 { // cwg506: yes
struct NonPod { ~NonPod(); };
@@ -82,7 +82,7 @@ namespace cwg506 { // cwg506: yes
void g(NonPod np) { f(np); }
// cxx98-error at -1 {{cannot pass object of non-POD type 'NonPod' through variadic function; call will abort at runtime}}
// since-cxx11-error at -2 {{cannot pass object of non-trivial type 'NonPod' through variadic function; call will abort at runtime}}
-}
+} // namespace cwg506
// FIXME: Add tests here once CWG260 is resolved.
// cwg507: dup 260
@@ -99,14 +99,14 @@ namespace cwg512 { // cwg512: yes
// cxx98-error at -1 {{union member 'a' has a non-trivial default constructor}}
// cxx98-note@#cwg512-A {{because type 'cwg512::A' has no default constructor}}
// cxx98-note@#cwg512-A-ctor {{implicit default constructor suppressed by user-declared constructor}}
-}
+} // namespace cwg512
// cwg513: na
namespace cwg514 { // cwg514: yes
namespace A { extern int x, y; }
int A::x = y;
-}
+} // namespace cwg514
namespace cwg515 { // cwg515: sup 1017
// FIXME: cwg1017 reverses the wording of cwg515, but the current draft has
@@ -121,7 +121,7 @@ namespace cwg515 { // cwg515: sup 1017
struct A { int a; };
struct B { void f() { int k = sizeof(A::a); } };
// cxx98-error at -1 {{invalid use of non-static data member 'a'}}
-}
+} // namespace cwg515
// cwg516: na
@@ -144,12 +144,12 @@ namespace cwg517 { // cwg517: no
// FIXME: These are both ill-formed.
template<typename T> struct S<T&> {};
template<typename T> int v<T&> = 0;
-}
+} // namespace cwg517
namespace cwg518 { // cwg518: yes c++11
enum E { e, };
// cxx98-error at -1 {{commas at the end of enumerator lists are a C++11 extension}}
-}
+} // namespace cwg518
// cwg519 is in cwg519.cpp
// cwg520: na
@@ -188,7 +188,7 @@ namespace cwg522 { // cwg522: yes
b3(d);
b3(cd);
}
-}
+} // namespace cwg522
namespace cwg524 { // cwg524: yes
template<typename T> void f(T a, T b) { operator+(a, b); }
@@ -203,7 +203,7 @@ namespace cwg524 { // cwg524: yes
namespace N { struct S {}; }
void operator+(N::S, N::S); // #cwg524-operator-plus
template void f(N::S, N::S); // #cwg524-f-N-S
-}
+} // namespace cwg524
namespace cwg525 { // cwg525: yes
namespace before {
@@ -222,7 +222,7 @@ namespace cwg525 { // cwg525: yes
delete ppp; // #cwg525-ppp
}
}
-}
+} // namespace cwg525
namespace cwg526 { // cwg526: yes
template<int> struct S {};
@@ -258,7 +258,7 @@ namespace cwg526 { // cwg526: yes
X<+N>::type v3;
// cxx98-17-error at -1 {{missing 'typename' prior to dependent type name X<+N>::type; implicit 'typename' is a C++20 extension}}
};
-}
+} // namespace cwg526
namespace cwg527 { // cwg527: na
// This DR is meaningless. It removes a required diagnostic from the case
@@ -273,7 +273,7 @@ namespace cwg527 { // cwg527: na
namespace { struct F { static P f; }; }
int ax = a.x, bx = b.x, cx = c.x, dx = d.x, ex = E::e->x, fx = F::f->x;
-}
+} // namespace cwg527
namespace cwg528 { // cwg528: 2.7
@@ -294,7 +294,7 @@ namespace cwg530 { // cwg530: yes
void f();
int a[S<&n>::N];
int b[T<&f>::N];
-}
+} // namespace cwg530
namespace cwg531 { // cwg531: partial
namespace good {
@@ -412,7 +412,7 @@ namespace cwg531 { // cwg531: partial
// cxx98-17-error at -1 {{template parameter list matching the non-templated nested type 'cwg531::nested::A<int>::B<char>' should be empty ('template<>')}}
#endif
}
-}
+} // namespace cwg531
// PR8130
namespace cwg532 { // cwg532: 3.5
@@ -428,7 +428,7 @@ namespace cwg532 { // cwg532: 3.5
B<A> b;
int &ir = b * a;
}
-}
+} // namespace cwg532
// cwg533: na
@@ -437,7 +437,7 @@ namespace cwg534 { // cwg534: 2.9
template<typename T> void operator+(S, T);
template<typename T> void operator+<T*>(S, T*) {}
// expected-error at -1 {{function template partial specialization is not allowed}}
-}
+} // namespace cwg534
namespace cwg535 { // cwg535: yes
class X { private: X(const X&); };
@@ -468,7 +468,7 @@ namespace cwg535 { // cwg535: yes
// ok, copy is elided
constexpr C x = c();
#endif
-}
+} // namespace cwg535
// cwg536: na
// cwg537: na
@@ -539,7 +539,7 @@ namespace cwg540 { // cwg540: yes
// expected-error@#cwg540-typedef-b-c {{typedef redefinition with
diff erent types ('const int &' vs 'int &')}}
// expected-note@#cwg540-typedef-a-c {{previous definition is here}}
// expected-warning@#cwg540-typedef-b-c {{'const' qualifier on reference type 'b' (aka 'const int &') has no effect}}
-}
+} // namespace cwg540
namespace cwg541 { // cwg541: yes
template<int> struct X { typedef int type; };
@@ -569,7 +569,7 @@ namespace cwg541 { // cwg541: yes
typename X<sizeof(h(0))>::type b;
}
};
-}
+} // namespace cwg541
namespace cwg542 { // cwg542: yes
#if __cplusplus >= 201103L
@@ -591,7 +591,7 @@ namespace cwg542 { // cwg542: yes
// since-cxx20-error at -1 {{calling a private constructor of class 'cwg542::B'}}
// since-cxx20-note@#cwg542-B-ctor {{declared private here}}
#endif
-}
+} // namespace cwg542
namespace cwg543 { // cwg543: 3.0
// In C++98+CWG543, this is valid because value-initialization doesn't call a
@@ -607,7 +607,7 @@ namespace cwg543 { // cwg543: 3.0
A a = A();
// since-cxx11-error at -1 {{call to implicitly-deleted default constructor of 'A'}}
// since-cxx11-note@#cwg543-A-n {{default constructor of 'A' is implicitly deleted because field 'n' of const-qualified type 'const int' would not be initialized}}
-}
+} // namespace cwg543
namespace cwg544 { // cwg544: yes
int *n;
@@ -616,13 +616,13 @@ namespace cwg544 { // cwg544: yes
template<class T> struct B : A<T> { int get(); };
template<> int B<int>::get() { return n; }
int k = B<int>().get();
-}
+} // namespace cwg544
namespace cwg546 { // cwg546: yes
template<typename T> struct A { void f(); };
template struct A<int>;
template<typename T> void A<T>::f() { T::error; }
-}
+} // namespace cwg546
namespace cwg547 { // cwg547: 3.2
template<typename T> struct X;
@@ -631,14 +631,14 @@ namespace cwg547 { // cwg547: 3.2
struct S { void f() const; };
X<void() const> x = f(&S::f);
-}
+} // namespace cwg547
namespace cwg548 { // cwg548: dup 482
template<typename T> struct S {};
template<typename T> void f() {}
template struct cwg548::S<int>;
template void cwg548::f<int>();
-}
+} // namespace cwg548
// cwg550: dup 393
@@ -657,13 +657,13 @@ namespace cwg551 { // cwg551: yes c++11
};
template inline void X<int>::f();
// since-cxx11-error at -1 {{explicit instantiation cannot be 'inline'}}
-}
+} // namespace cwg551
namespace cwg552 { // cwg552: yes
template<typename T, typename T::U> struct X {};
struct Y { typedef int U; };
X<Y, 0> x;
-}
+} // namespace cwg552
// cwg553: 2.7
struct cwg553_class {
@@ -683,7 +683,7 @@ namespace cwg553 {
friend void *operator new(size_t, namespace_scope);
// expected-error at -1 {{'operator new' cannot be declared inside a namespace}}
};
-}
+} // namespace cwg553
// cwg554: na
@@ -753,7 +753,7 @@ namespace cwg557 { // cwg557: 3.1
f(p);
g(q);
}
-}
+} // namespace cwg557
namespace cwg558 { // cwg558: 2.9
wchar_t a = L'\uD7FF';
@@ -766,7 +766,7 @@ namespace cwg558 { // cwg558: 2.9
wchar_t f = L'\xDFFF';
wchar_t g = L'\uE000';
wchar_t h = L'\xE000';
-}
+} // namespace cwg558
template<typename> struct cwg559 { typedef int T; cwg559::T u; }; // cwg559: yes
@@ -796,7 +796,7 @@ namespace cwg561 { // cwg561: yes
void h(S s) {
g(s);
}
-}
+} // namespace cwg561
// cwg562: na
// cwg563 is in cwg563.cpp
@@ -806,7 +806,7 @@ namespace cwg564 { // cwg564: yes
void f(int); // ok
extern "C++" { extern int n; }
int n; // ok
-}
+} // namespace cwg564
namespace cwg565 { // cwg565: yes
namespace N {
@@ -822,13 +822,13 @@ namespace cwg565 { // cwg565: yes
// expected-error at -1 {{declaration conflicts with target of using declaration already in scope}}
// expected-note@#cwg565-f {{target of using declaration}}
// expected-note@#cwg565-using {{using declaration}}
-}
+} // namespace cwg565
namespace cwg566 { // cwg566: yes
#if __cplusplus >= 201103L
static_assert(int(-3.99) == -3, "");
#endif
-}
+} // namespace cwg566
// cwg567: na
@@ -871,14 +871,14 @@ namespace cwg568 { // cwg568: 3.0 c++11
trivial t; // #cwg568-t
x: ;
}
-}
+} // namespace cwg568
namespace cwg569 { // cwg569: yes c++11
// FIXME: This is a DR issue against C++98, so should probably apply there
// too.
;;;;;
// cxx98-error at -1 {{C++11 extension}}
-}
+} // namespace cwg569
namespace cwg570 { // cwg570: dup 633
int n;
@@ -886,14 +886,14 @@ namespace cwg570 { // cwg570: dup 633
int &r = n;
// expected-error at -1 {{redefinition of 'r'}}
// expected-note@#cwg570-r {{previous definition is here}}
-}
+} // namespace cwg570
// cwg571 is in cwg571.cpp
namespace cwg572 { // cwg572: yes
enum E { a = 1, b = 2 };
static_assert(a + b == 3, "");
-}
+} // namespace cwg572
namespace cwg573 { // cwg573: no
void *a;
@@ -910,7 +910,7 @@ namespace cwg573 { // cwg573: no
// FIXME: This is ill-formed.
template<void*> struct S;
template<int*> struct T;
-}
+} // namespace cwg573
namespace cwg574 { // cwg574: 3.0
struct A {
@@ -965,7 +965,7 @@ namespace cwg574 { // cwg574: 3.0
// since-cxx11-note@#cwg574-D-copy-assign {{candidate function}}
#endif
};
-}
+} // namespace cwg574
namespace cwg575 { // cwg575: yes
template<typename T, typename U = typename T::type> void a(T); void a(...);
@@ -993,7 +993,7 @@ namespace cwg575 { // cwg575: yes
template<typename T> T &h(T *);
template<typename T> T *h(T *);
void *p = h((void*)0);
-}
+} // namespace cwg575
namespace cwg576 { // cwg576: 3.5
typedef void f() {}
@@ -1001,7 +1001,7 @@ namespace cwg576 { // cwg576: 3.5
void f(typedef int n);
// expected-error at -1 {{invalid storage class specifier in function declarator}}
void f(char c) { typedef int n; }
-}
+} // namespace cwg576
namespace cwg577 { // cwg577: 3.5
typedef void V;
@@ -1036,7 +1036,7 @@ namespace cwg577 { // cwg577: 3.5
// expected-error at -1 {{no matching function for call to 'j'}}
// expected-note@#cwg577-j {{candidate template ignored: substitution failure [with T = const void]: argument may not have 'void' type}}
}
-}
+} // namespace cwg577
namespace cwg580 { // cwg580: partial
class C;
@@ -1086,7 +1086,7 @@ namespace cwg580 { // cwg580: partial
// expected-note@#cwg580-C-ctor {{implicitly declared private here}}
// expected-error@#cwg580-c {{variable of type 'C' has private destructor}}
// expected-note@#cwg580-C-dtor {{implicitly declared private here}}
-}
+} // namespace cwg580
// cwg582: na
@@ -1101,7 +1101,7 @@ namespace cwg583 { // cwg583: 4
// expected-error at -1 {{ordered comparison between pointer and zero ('int *' and 'int')}}
bool b4 = p >= 0;
// expected-error at -1 {{ordered comparison between pointer and zero ('int *' and 'int')}}
-}
+} // namespace cwg583
// cwg584: na
@@ -1127,7 +1127,7 @@ namespace cwg585 { // cwg585: 3.0
template<typename U> friend T<U>;
// expected-error at -1 {{friend type templates must use an elaborated type}}
};
-}
+} // namespace cwg585
// cwg586: na
@@ -1138,7 +1138,7 @@ namespace cwg587 { // cwg587: 3.2
struct S {};
template void f(bool, const int, int);
template void f(bool, const S, S);
-}
+} // namespace cwg587
namespace cwg588 { // cwg588: yes
struct A { int n; }; // #cwg588-A
@@ -1153,7 +1153,7 @@ namespace cwg588 { // cwg588: yes
}
struct B { int n; }; // #cwg588-B
int k = f<B>(); // #cwg588-k
-}
+} // namespace cwg588
namespace cwg589 { // cwg589: yes
struct B { };
@@ -1165,7 +1165,7 @@ namespace cwg589 { // cwg589: yes
// expected-error at -1 {{taking the address of a temporary object of type 'const B'}}
const B *q = &(a ? D() : b);
// expected-error at -1 {{taking the address of a temporary object of type 'const B'}}
-}
+} // namespace cwg589
namespace cwg590 { // cwg590: yes
template<typename T> struct A {
@@ -1176,7 +1176,7 @@ namespace cwg590 { // cwg590: yes
};
};
template<typename T> typename A<T>::B::C A<T>::B::C::f(A<T>::B::C) {}
-}
+} // namespace cwg590
namespace cwg591 { // cwg591: 20
template<typename T> struct A {
@@ -1245,7 +1245,7 @@ namespace cwg591 { // cwg591: 20
M m;
// expected-error at -1 {{field has incomplete type 'M' (aka 'void'}}
};
-}
+} // namespace cwg591
// cwg592: na
// cwg593 is in cwg593.cpp
@@ -1260,7 +1260,7 @@ namespace cwg595 { // cwg595: dup 1330
struct S {
X<S> xs;
};
-}
+} // namespace cwg595
// cwg597: na
@@ -1284,7 +1284,7 @@ namespace cwg598 { // cwg598: yes
int &s = h(N::f);
// expected-error at -1 {{use of undeclared identifier 'h'}}
int &t = h(N::i);
-}
+} // namespace cwg598
namespace cwg599 { // cwg599: partial
typedef int Fn();
@@ -1311,4 +1311,4 @@ namespace cwg599 { // cwg599: partial
// expected-note@#cwg599-U {{conversion to pointer type 'void *'}}
delete v;
}
-}
+} // namespace cwg599
diff --git a/clang/test/CXX/drs/cwg6xx.cpp b/clang/test/CXX/drs/cwg6xx.cpp
index 7920c4383f475b..38f440d4154add 100644
--- a/clang/test/CXX/drs/cwg6xx.cpp
+++ b/clang/test/CXX/drs/cwg6xx.cpp
@@ -61,7 +61,7 @@ static_assert(0x8000000000000000 < -1, "0x8000000000000000 should be unsigned");
#endif
#undef MAX
-}
+} // namespace cwg601
namespace cwg602 { // cwg602: yes
template<class T> struct A {
@@ -76,14 +76,14 @@ namespace cwg602 { // cwg602: yes
typename C::type ct; // ok, befriended
};
B<int> b;
-}
+} // namespace cwg602
namespace cwg603 { // cwg603: yes
template<unsigned char> struct S {};
typedef S<'\001'> S1;
typedef S<(1ul << __CHAR_BIT__) + 1> S1;
// since-cxx11-error at -1 {{cannot be narrowed}}
-}
+} // namespace cwg603
// cwg604: na
// cwg605 is in cwg605.cpp
@@ -108,7 +108,7 @@ namespace cwg606 { // cwg606: 3.0
h(test); // ok, an rvalue reference can bind to a function lvalue
}
#endif
-}
+} // namespace cwg606
namespace cwg607 { // cwg607: yes
namespace example1 {
@@ -143,14 +143,14 @@ namespace cwg608 { // cwg608: yes
struct B : A {};
struct C : A { void f(); };
struct D : B, C {};
-}
+} // namespace cwg608
static_assert(-0u == 0u, ""); // cwg610: yes
namespace cwg611 { // cwg611: yes
int k;
struct S { int &r; } s = { k ? k : k };
-}
+} // namespace cwg611
// cwg612: na
@@ -189,7 +189,7 @@ namespace cwg613 { // cwg613: yes c++11
// cxx98-error at -1 {{invalid use of member 'n' in static member function}}
// since-cxx11-error at -2 {{invalid use of non-static data member 'n'}}
}
-}
+} // namespace cwg613
static_assert((-1) / 2 == 0, ""); // cwg614: yes
static_assert((-1) % 2 == -1, "");
@@ -197,7 +197,7 @@ static_assert((-1) % 2 == -1, "");
namespace cwg615 { // cwg615: yes
int f();
static int n = f();
-}
+} // namespace cwg615
namespace cwg616 { // cwg616: 4
#if __cplusplus >= 201103L
@@ -215,13 +215,13 @@ namespace cwg616 { // cwg616: 4
using U = decltype(static_cast<S&&>(s).n);
using U = int;
#endif
-}
+} // namespace cwg616
namespace cwg618 { // cwg618: yes
#if (unsigned)-1 > 0
#error wrong
#endif
-}
+} // namespace cwg618
namespace cwg619 { // cwg619: yes
extern int x[10];
@@ -240,7 +240,7 @@ namespace cwg619 { // cwg619: yes
sizeof(x);
// expected-error at -1 {{invalid application of 'sizeof' to an incomplete type 'int[]'}}
}
-}
+} // namespace cwg619
// cwg620: dup 568
@@ -250,7 +250,7 @@ namespace cwg621 { // cwg621: yes
template<> int f<int>() {}
// expected-error at -1 {{redefinition of 'f<int>'}}
// expected-note@#cwg621-f {{previous definition is here}}
-}
+} // namespace cwg621
// cwg623: na
// FIXME: Add documentation saying we allow invalid pointer values.
@@ -266,14 +266,14 @@ namespace cwg625 { // cwg625: yes
void (*p)(auto) = f;
// cxx98-error at -1 {{'auto' type specifier is a C++11 extension}}
// expected-error at -2 {{'auto' not allowed in function prototype}}
-}
+} // namespace cwg625
namespace cwg626 { // cwg626: yes
#define STR(x) #x
char c[2] = STR(c); // ok, type matches
wchar_t w[2] = STR(w);
// expected-error at -1 {{initializing wide char array with non-wide string literal}}
-}
+} // namespace cwg626
namespace cwg627 { // cwg627: yes
void f() {
@@ -283,7 +283,7 @@ namespace cwg627 { // cwg627: yes
// expected-error at -2 {{use of undeclared identifier 'a'}}
// expected-warning at -3 {{expression result unused}}
}
-}
+} // namespace cwg627
// cwg628: na
@@ -298,7 +298,7 @@ namespace cwg629 { // cwg629: 2.9
// since-cxx11-error at -1 {{redefinition of 'T'}}
// since-cxx11-note@#cwg629-T {{previous definition is here}}
}
-}
+} // namespace cwg629
namespace cwg630 { // cwg630: yes
const bool MB_EQ_WC =
@@ -332,14 +332,14 @@ static_assert(!MB_EQ_WC, "__STDC_MB_MIGHT_NEQ_WC__ but all basic source characte
#else
static_assert(MB_EQ_WC, "!__STDC_MB_MIGHT_NEQ_WC__ but some character
diff ers");
#endif
-}
+} // namespace cwg630
// cwg631: na
namespace cwg632 { // cwg632: yes
struct S { int n; } s = {{5}};
// expected-warning at -1 {{braces around scalar initializer}}
-}
+} // namespace cwg632
// cwg633: na
// see also n2993
@@ -354,7 +354,7 @@ namespace cwg634 { // cwg634: yes
int k = f(S());
// cxx98-error at -1 {{cannot pass object of non-POD type 'S' through variadic function; call will abort at runtime}}
// since-cxx11-error at -2 {{cannot pass object of non-trivial type 'S' through variadic function; call will abort at runtime}}
-}
+} // namespace cwg634
namespace cwg635 { // cwg635: yes
template<typename T> struct A { A(); ~A(); };
@@ -381,7 +381,7 @@ namespace cwg635 { // cwg635: yes
// expected-error@#cwg635-D-T {{out-of-line constructor for 'D' cannot have template arguments}}
// expected-error@#cwg635-D-T {{redefinition of 'D<T>'}}
// expected-note@#cwg635-D {{previous definition is here}}
-}
+} // namespace cwg635
namespace cwg637 { // cwg637: yes
void f(int i) {
@@ -389,7 +389,7 @@ namespace cwg637 { // cwg637: yes
i = i++ + 1;
// cxx98-14-warning at -1 {{multiple unsequenced modifications to 'i'}}
}
-}
+} // namespace cwg637
namespace cwg638 { // cwg638: no
template<typename T> struct A {
@@ -424,14 +424,14 @@ namespace cwg638 { // cwg638: no
void h() { X::type e; } // FIXME: private
};
};
-}
+} // namespace cwg638
namespace cwg639 { // cwg639: 3.3
void f(int i) {
void((i = 0) + (i = 0));
// expected-warning at -1 {{multiple unsequenced modifications to 'i'}}
}
-}
+} // namespace cwg639
namespace cwg641 { // cwg641: yes
namespace std_example {
@@ -481,7 +481,7 @@ namespace cwg641 { // cwg641: yes
(void)A();
(void)ca;
}
-}
+} // namespace cwg641
namespace cwg642 { // cwg642: yes
void f() {
@@ -497,10 +497,10 @@ namespace cwg642 { // cwg642: yes
struct s *p = new struct s;
p->a = s;
}
-}
+} // namespace cwg642
-#if __cplusplus >= 201103L
namespace cwg643 { // cwg643: 3.2
+#if __cplusplus >= 201103L
struct A {
int x;
auto f() -> decltype(this->x);
@@ -514,11 +514,11 @@ namespace cwg643 { // cwg643: 3.2
// since-cxx11-error at -1 {{use of undeclared identifier 'y'}}
int y;
};
-}
#endif
+} // namespace cwg643
-#if __cplusplus >= 201103L
namespace cwg644 { // cwg644: partial
+#if __cplusplus >= 201103L
struct A {
A() = default;
int x, y;
@@ -541,15 +541,15 @@ namespace cwg644 { // cwg644: partial
constexpr E() = default;
};
static_assert(!__is_literal_type(E<C>), "");
-}
#endif
+} // namespace cwg644
// cwg645 increases permission to optimize; it's not clear that it's possible to
// test for this.
// cwg645: na
-#if __cplusplus >= 201103L
namespace cwg646 { // cwg646: sup 981
+#if __cplusplus >= 201103L
struct A {
constexpr A(const A&) = default; // ok
};
@@ -559,11 +559,11 @@ namespace cwg646 { // cwg646: sup 981
B(B&);
};
constexpr B b = {}; // ok
-}
#endif
+} // namespace cwg646
-#if __cplusplus >= 201103L
namespace cwg647 { // cwg647: 3.1
+#if __cplusplus >= 201103L
// This is partially superseded by cwg1358.
struct A {
constexpr virtual void f() const;
@@ -620,20 +620,20 @@ namespace cwg647 { // cwg647: 3.1
: n(get()),
d(D(0) + f) {} // #cwg647-float-d
};
-}
#endif
+} // namespace cwg647
-#if __cplusplus >= 201103L
namespace cwg648 { // cwg648: yes
+#if __cplusplus >= 201103L
int f();
constexpr int a = (true ? 1 : f());
constexpr int b = false && f();
constexpr int c = true || f();
-}
#endif
+} // namespace cwg648
-#if __cplusplus >= 201103L
namespace cwg649 { // cwg649: 3.5
+#if __cplusplus >= 201103L
// Maximum alignment is 8192 bytes for Windows, and 4 GB for Linux
alignas(0x200000000) int n;
// since-cxx11-error-re at -1 {{{{requested alignment must be (8192|4294967296) bytes or smaller}}}}
@@ -646,13 +646,13 @@ struct Y {
struct alignas(256) Z {};
// This part is superseded by cwg2130 and eventually by aligned allocation support.
auto *p = new Z;
-}
#endif
+} // namespace cwg649
// cwg650 is in cwg650.cpp
-#if __cplusplus >= 201103L
namespace cwg651 { // cwg651: yes
+#if __cplusplus >= 201103L
struct X {
virtual X &f();
};
@@ -661,20 +661,20 @@ namespace cwg651 { // cwg651: yes
};
using T = decltype(((X&&)Y()).f());
using T = X &;
-}
#endif
+} // namespace cwg651
-#if __cplusplus >= 201103L
namespace cwg652 { // cwg652: yes
+#if __cplusplus >= 201103L
constexpr int n = 1.2 * 3.4;
static_assert(n == 4, "");
-}
#endif
+} // namespace cwg652
// cwg653 is in cwg653.cpp
-#if __cplusplus >= 201103L
namespace cwg654 { // cwg654: sup 1423
+#if __cplusplus >= 201103L
void f() {
if (nullptr) {}
// since-cxx11-warning at -1 {{implicit conversion of nullptr constant to 'bool'}}
@@ -697,8 +697,8 @@ namespace cwg654 { // cwg654: sup 1423
void(true ? nullptr : 0);
void(true ? 0 : nullptr);
}
-}
#endif
+} // namespace cwg654
namespace cwg655 { // cwg655: yes
struct A { A(int); }; // #cwg655-A
@@ -716,7 +716,7 @@ namespace cwg655 { // cwg655: yes
// expected-note@#cwg655-a {{member is declared here}}
// expected-note@#cwg655-A {{'cwg655::A' declared here}}
};
-}
+} // namespace cwg655
namespace cwg656 { // cwg656: yes
struct A { A(const A&) = delete; };
@@ -757,7 +757,7 @@ namespace cwg656 { // cwg656: yes
// expected-note@#cwg656-Y {{candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 1 was provided}}
accept<const D&>(c);
}
-}
+} // namespace cwg656
namespace cwg657 { // cwg657: partial
struct Abs { virtual void x() = 0; }; // #cwg657-Abs
@@ -795,12 +795,12 @@ namespace cwg657 { // cwg657: partial
// FIXME: We should reject this too.
Cnvt2<Abs>::type err;
-}
+} // namespace cwg657
// cwg658 is in cwg658.cpp
-#if __cplusplus >= 201103L
namespace cwg659 { // cwg659: 3.0
+#if __cplusplus >= 201103L
static_assert(alignof(char) == alignof(char&), "");
static_assert(alignof(int) == alignof(int&), "");
int n = alignof(int(&)());
@@ -809,11 +809,11 @@ namespace cwg659 { // cwg659: 3.0
int m = alignof(A&);
// since-cxx11-error at -1 {{invalid application of 'alignof' to an incomplete type 'A'}}
// since-cxx11-note@#cwg659-A {{forward declaration of 'cwg659::A'}}
-}
#endif
+} // namespace cwg659
-#if __cplusplus >= 201103L
namespace cwg660 { // cwg660: 3.0
+#if __cplusplus >= 201103L
enum : int { a };
enum class { b };
// since-cxx11-error at -1 {{scoped enumeration requires a name}}
@@ -825,8 +825,8 @@ namespace cwg660 { // cwg660: 3.0
// since-cxx11-error at -1 {{scoped enumeration requires a name}}
};
auto y = X::a;
-}
#endif
+} // namespace cwg660
// cwg661 is in cwg661.cpp
@@ -841,22 +841,22 @@ namespace cwg662 { // cwg662: yes
#endif
}
void g(int n) { f<int&>(n); } // #cwg662-f-call
-}
+} // namespace cwg662
namespace cwg663 { // cwg663: sup P1949
int ЍЎ = 123;
-}
+} // namespace cwg663
-#if __cplusplus >= 201103L
namespace cwg664 { // cwg664: yes
+#if __cplusplus >= 201103L
struct A { A(const A&) = delete; };
A &&f(A &&a, int n) {
if (n)
return f(static_cast<A&&>(a), n - 1);
return static_cast<A&&>(a);
}
-}
#endif
+} // namespace cwg664
namespace cwg665 { // cwg665: 2.8
struct A { virtual ~A(); };
@@ -883,7 +883,7 @@ namespace cwg665 { // cwg665: 2.8
// expected-note@#cwg665-VC {{declared private here}}
(void)dynamic_cast<A*>(vd);
}
-}
+} // namespace cwg665
namespace cwg666 { // cwg666: 2.8
struct P { friend P operator*(P, P); P(int); } p(0);
@@ -902,11 +902,11 @@ namespace cwg666 { // cwg666: 2.8
struct Y { typedef int type; };
int a = f<X>();
int b = f<Y>(); // #cwg666-f-Y
-}
+} // namespace cwg666
// Triviality is entirely
diff erent in C++98.
-#if __cplusplus >= 201103L
namespace cwg667 { // cwg667: 8
+#if __cplusplus >= 201103L
struct A {
A() = default; // #cwg667-A-ctor
// since-cxx11-warning at -1 {{explicitly defaulted default constructor is implicitly deleted}}
@@ -927,13 +927,13 @@ namespace cwg667 { // cwg667: 8
struct F { F &operator=(F&&) = delete; };
struct G : F {};
static_assert(!__is_trivially_assignable(G, G&&), "");
-}
#endif
+} // namespace cwg667
// cwg668 needs an libc++abi test
-#if __cplusplus >= 201103L
namespace cwg669 { // cwg669: yes
+#if __cplusplus >= 201103L
void f() {
int n;
using T = decltype(n);
@@ -958,8 +958,8 @@ namespace cwg669 { // cwg669: yes
}
};
}
-}
#endif
+} // namespace cwg669
namespace cwg671 { // cwg671: 2.9
enum class E { e };
@@ -968,7 +968,7 @@ namespace cwg671 { // cwg671: 2.9
int n = static_cast<int>(E::e);
// cxx98-error at -1 {{use of enumeration in a nested name specifier is a C++11 extension}}
int m = static_cast<int>(e);
-}
+} // namespace cwg671
// cwg672 is in cwg672.cpp
@@ -988,7 +988,7 @@ namespace cwg673 { // cwg673: yes
E *e;
F *f;
// expected-error at -1 {{unknown type name 'F'}}
-}
+} // namespace cwg673
namespace cwg674 { // cwg674: 8
template<typename T> int f(T);
@@ -1054,7 +1054,7 @@ namespace cwg674 { // cwg674: 8
template int Y::f<>(int);
template int Y::g<>(int); // #cwg674-Y-g-int
template int Y::h<>(int);
-}
+} // namespace cwg674
namespace cwg675 { // cwg675: dup 739
template<typename T> struct A { T n : 1; };
@@ -1066,7 +1066,7 @@ namespace cwg675 { // cwg675: dup 739
static_assert(A<long long>{1}.n < 0, "");
// since-cxx11-warning at -1 {{implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1}}
#endif
-}
+} // namespace cwg675
// cwg676: na
@@ -1092,7 +1092,7 @@ namespace cwg677 { // cwg677: no
B::~B() {}
// expected-error at -1 {{attempt to use a deleted function}}
// expected-note@#cwg677-B-delete {{'operator delete' has been explicitly marked deleted here}}
-}
+} // namespace cwg677
// cwg678 FIXME: check that the modules ODR check catches this
@@ -1103,12 +1103,12 @@ namespace cwg679 { // cwg679: yes
template<> void operator+<0>(X, X) {}
// expected-error at -1 {{redefinition of 'operator+<0>'}}
// expected-note@#cwg679-def {{previous definition is here}}
-}
+} // namespace cwg679
// cwg680: na
-#if __cplusplus >= 201103L
namespace cwg681 { // cwg681: partial
+#if __cplusplus >= 201103L
auto *a() -> int;
// since-cxx11-error at -1 {{function with trailing return type must specify return type 'auto', not 'auto *'}}
auto (*b)() -> int;
@@ -1127,11 +1127,11 @@ namespace cwg681 { // cwg681: partial
auto f() -> int (*)();
auto g() -> auto (*)() -> int;
-}
#endif
+} // namespace cwg681
-#if __cplusplus >= 201103L
namespace cwg683 { // cwg683: yes
+#if __cplusplus >= 201103L
struct A {
A() = default;
A(const A&) = default;
@@ -1145,11 +1145,11 @@ namespace cwg683 { // cwg683: yes
static_assert(__is_trivially_constructible(B, const B&), "");
static_assert(__is_trivially_constructible(B, B&), "");
static_assert(__is_trivial(B), "");
-}
#endif
+} // namespace cwg683
-#if __cplusplus >= 201103L
namespace cwg684 { // cwg684: sup 1454
+#if __cplusplus >= 201103L
void f() {
int a; // #cwg684-a
constexpr int *p = &a;
@@ -1157,8 +1157,8 @@ namespace cwg684 { // cwg684: sup 1454
// expected-note at -2 {{pointer to 'a' is not a constant expression}}
// expected-note@#cwg684-a {{here}}
}
-}
#endif
+} // namespace cwg684
namespace cwg685 { // cwg685: yes
enum E : long { e };
@@ -1188,7 +1188,7 @@ namespace cwg685 { // cwg685: yes
int k(short);
void k(int);
int x = k(g);
-}
+} // namespace cwg685
namespace cwg686 { // cwg686: 3.0
void f() {
@@ -1256,7 +1256,7 @@ namespace cwg686 { // cwg686: 3.0
template<struct R *> struct X;
template<struct R {} *> struct Y;
// expected-error at -1 {{'cwg686::R' cannot be defined in a type specifier}}
-}
+} // namespace cwg686
namespace cwg687 { // cwg687 (9 c++20, but the issue is still considered open)
template<typename T> void f(T a) {
@@ -1268,7 +1268,7 @@ namespace cwg687 { // cwg687 (9 c++20, but the issue is still considered open)
template g<int>(a);
// expected-error at -1 {{expected '<' after 'template'}}
}
-}
+} // namespace cwg687
namespace cwg692 { // cwg692: 16
// Also see cwg1395.
@@ -1359,7 +1359,7 @@ namespace cwg692 { // cwg692: 16
template<class T> void f(T){}
template void f(int*);
}
-}
+} // namespace cwg692
namespace cwg696 { // cwg696: 3.1
void f(const int*);
@@ -1385,4 +1385,4 @@ namespace cwg696 { // cwg696: 3.1
// since-cxx11-note at -7 {{default capture by reference}}
#endif
}
-}
+} // namespace cwg696
diff --git a/clang/test/CXX/drs/cwg722.cpp b/clang/test/CXX/drs/cwg722.cpp
index 6e7d4569c55381..1d95e14c5ff2a4 100644
--- a/clang/test/CXX/drs/cwg722.cpp
+++ b/clang/test/CXX/drs/cwg722.cpp
@@ -12,7 +12,7 @@
#if __cplusplus >= 201103L
namespace std {
using nullptr_t = decltype(nullptr);
-}
+} // namespace std
void f(std::nullptr_t, ...);
std::nullptr_t g();
diff --git a/clang/test/CXX/drs/cwg7xx.cpp b/clang/test/CXX/drs/cwg7xx.cpp
index d606542ff14d9e..0169657312e575 100644
--- a/clang/test/CXX/drs/cwg7xx.cpp
+++ b/clang/test/CXX/drs/cwg7xx.cpp
@@ -24,7 +24,7 @@ namespace cwg705 { // cwg705: yes
// expected-error at -1 {{use of undeclared identifier 'f'}}
// expected-note@#cwg705-f {{'N::f' declared here}}
}
-}
+} // namespace cwg705
namespace cwg712 { // cwg712: partial
void use(int);
@@ -76,7 +76,7 @@ namespace cwg712 { // cwg712: partial
};
}
#endif
-}
+} // namespace cwg712
namespace cwg713 { // cwg713: 3.0
template<typename T>
@@ -324,7 +324,7 @@ namespace cwg727 { // cwg727: partial
// expected-note@#cwg727-S2-T {{previous}}
};
Collision<int, int> c; // #cwg727-Collision-int-int
-}
+} // namespace cwg727
namespace cwg777 { // cwg777: 3.7
#if __cplusplus >= 201103L
@@ -338,7 +338,7 @@ void g(int i = 0, T ...args, T ...args2) {}
template <typename... T>
void h(int i = 0, T ...args, int j = 1) {}
#endif
-}
+} // namespace cwg777
namespace cwg794 { // cwg794: 2.7
struct B {};
diff --git a/clang/test/CXX/drs/cwg8xx.cpp b/clang/test/CXX/drs/cwg8xx.cpp
index 38bff3adf262a8..ecb9113ccfe660 100644
--- a/clang/test/CXX/drs/cwg8xx.cpp
+++ b/clang/test/CXX/drs/cwg8xx.cpp
@@ -13,7 +13,7 @@ export template <class T> struct B {};
export template<typename T> void f() {}
// cxx98-17-warning at -1 {{exported templates are unsupported}}
// since-cxx20-error at -2 {{export declaration can only be used within a module purview}}
-}
+} // namespace cwg820
namespace cwg873 { // cwg873: 3.0
#if __cplusplus >= 201103L
diff --git a/clang/test/CXX/drs/cwg9xx.cpp b/clang/test/CXX/drs/cwg9xx.cpp
index 9b1387ca0e7680..c07c276c021d15 100644
--- a/clang/test/CXX/drs/cwg9xx.cpp
+++ b/clang/test/CXX/drs/cwg9xx.cpp
@@ -13,7 +13,7 @@ namespace std {
const T *p; size_t n;
initializer_list(const T *p, size_t n);
};
-}
+} // namespace std
namespace cwg930 { // cwg930: 2.7
#if __cplusplus >= 201103L
@@ -49,7 +49,7 @@ namespace cwg948 { // cwg948: 3.7
while (constexpr A i = 0) { }
}
#endif
-}
+} // namespace cwg948
namespace cwg952 { // cwg952: 2.8
namespace example1 {
@@ -150,7 +150,7 @@ namespace cwg974 { // cwg974: yes
auto lam = [](int x = 42) { return x; };
}
#endif
-}
+} // namespace cwg974
namespace cwg977 { // cwg977: yes
enum E { e = E() }; // #cwg977-E
@@ -198,4 +198,4 @@ namespace cwg990 { // cwg990: 3.5
};
D d{};
#endif
-}
+} // namespace cwg990
More information about the cfe-commits
mailing list