@@ -89,12 +89,11 @@ namespace dr7 { // dr7: 3.4
89
89
class B : virtual private A {}; // #dr7-B
90
90
class C : public B {} c; // #dr7-C
91
91
// expected-error@#dr7-C {{inherited virtual base class 'A' has private destructor}}
92
- // expected-note@#dr7-C {{in implicit default constructor for 'dr7::C' first required here}}
93
- // expected-note@#dr7-B {{declared private here}}
94
-
92
+ // expected-note@#dr7-C {{in implicit default constructor for 'dr7::C' first required here}}
93
+ // expected-note@#dr7-B {{declared private here}}
95
94
// expected-error@#dr7-C {{inherited virtual base class 'A' has private destructor}}
96
- // expected-note@#dr7-C {{in implicit destructor for 'dr7::C' first required here}}
97
- // expected-note@#dr7-B {{declared private here}}
95
+ // expected-note@#dr7-C {{in implicit destructor for 'dr7::C' first required here}}
96
+ // expected-note@#dr7-B {{declared private here}}
98
97
class VeryDerivedC : public B , virtual public A {} vdc;
99
98
100
99
class X { ~X (); }; // #dr7-X
@@ -237,11 +236,10 @@ namespace dr16 { // dr16: 2.8
237
236
// expected-note@#dr16-A-f-decl {{member is declared here}}
238
237
A::f (); // #dr16-A-f-call
239
238
// expected-error@#dr16-A-f-call {{'A' is a private member of 'dr16::A'}}
240
- // expected-note@#dr16-B {{constrained by implicitly private inheritance here}}
241
- // expected-note@#dr16-A {{member is declared here}}
242
-
239
+ // expected-note@#dr16-B {{constrained by implicitly private inheritance here}}
240
+ // expected-note@#dr16-A {{member is declared here}}
243
241
// expected-error@#dr16-A-f-call {{cannot cast 'dr16::C' to its private base class 'dr16::A'}}
244
- // expected-note@#dr16-B {{implicitly declared private here}}
242
+ // expected-note@#dr16-B {{implicitly declared private here}}
245
243
}
246
244
};
247
245
}
@@ -361,9 +359,9 @@ namespace dr26 { // dr26: yes
361
359
// FIXME: In C++98, we diagnose this twice.
362
360
B (const B &, B = B());
363
361
// cxx98-14-error@-1 {{recursive evaluation of default argument}}
364
- // cxx98-14-note@-2 {{default argument used here}}
362
+ // cxx98-14-note@-2 {{default argument used here}}
365
363
// cxx98-error@-3 {{recursive evaluation of default argument}}
366
- // cxx98-note@-4 {{default argument used here}}
364
+ // cxx98-note@-4 {{default argument used here}}
367
365
};
368
366
struct C {
369
367
static C &f ();
@@ -788,23 +786,20 @@ namespace dr49 { // dr49: 2.8
788
786
A<&k> a;
789
787
A<p> b; // #dr49-b
790
788
// cxx98-error@#dr49-b {{non-type template argument referring to object 'p' with internal linkage is a C++11 extension}}
791
- // cxx98-note@#dr49-p {{non-type template argument refers to object here}}
792
-
789
+ // cxx98-note@#dr49-p {{non-type template argument refers to object here}}
793
790
// cxx98-14-error@#dr49-b {{non-type template argument for template parameter of pointer type 'int *' must have its address taken}}
794
- // cxx98-14-note@#dr49-A {{template parameter is declared here}}
791
+ // cxx98-14-note@#dr49-A {{template parameter is declared here}}
795
792
int *q = &k; // #dr49-q
796
793
A<q> c; // #dr49-c
797
794
// cxx98-error@#dr49-c {{non-type template argument for template parameter of pointer type 'int *' must have its address taken}}
798
- // cxx98-note@#dr49-A {{template parameter is declared here}}
799
-
795
+ // cxx98-note@#dr49-A {{template parameter is declared here}}
800
796
// cxx11-14-error@#dr49-c {{non-type template argument of type 'int *' is not a constant expression}}
801
- // cxx11-14-note@#dr49-c {{read of non-constexpr variable 'q' is not allowed in a constant expression}}
802
- // cxx11-14-note@#dr49-q {{declared here}}
803
- // cxx11-14-note@#dr49-A {{template parameter is declared here}}
804
-
797
+ // cxx11-14-note@#dr49-c {{read of non-constexpr variable 'q' is not allowed in a constant expression}}
798
+ // cxx11-14-note@#dr49-q {{declared here}}
799
+ // cxx11-14-note@#dr49-A {{template parameter is declared here}}
805
800
// since-cxx17-error@#dr49-c {{non-type template argument is not a constant expression}}
806
- // since-cxx17-note@#dr49-c {{read of non-constexpr variable 'q' is not allowed in a constant expression}}
807
- // since-cxx17-note@#dr49-q {{declared here}}
801
+ // since-cxx17-note@#dr49-c {{read of non-constexpr variable 'q' is not allowed in a constant expression}}
802
+ // since-cxx17-note@#dr49-q {{declared here}}
808
803
}
809
804
810
805
namespace dr50 { // dr50: yes
@@ -835,11 +830,10 @@ namespace dr52 { // dr52: 2.8
835
830
int k = b.A::n; // #dr52-k
836
831
// FIXME: This first diagnostic is very strangely worded, and seems to be bogus.
837
832
// expected-error@#dr52-k {{'A' is a private member of 'dr52::A'}}
838
- // expected-note@#dr52-B {{constrained by private inheritance here}}
839
- // expected-note@#dr52-A {{member is declared here}}
840
-
833
+ // expected-note@#dr52-B {{constrained by private inheritance here}}
834
+ // expected-note@#dr52-A {{member is declared here}}
841
835
// expected-error@#dr52-k {{cannot cast 'struct B' to its private base class 'dr52::A'}}
842
- // expected-note@#dr52-B {{declared private here}}
836
+ // expected-note@#dr52-B {{declared private here}}
843
837
}
844
838
845
839
namespace dr53 { // dr53: yes
@@ -1171,8 +1165,7 @@ namespace dr76 { // dr76: yes
1171
1165
const volatile int n = 1 ;
1172
1166
int arr[n]; // #dr76-vla
1173
1167
// expected-error@#dr76-vla {{variable length arrays in C++ are a Clang extension}}
1174
- // expected-note@#dr76-vla {{read of volatile-qualified type 'const volatile int' is not allowed in a constant expression}}
1175
-
1168
+ // expected-note@#dr76-vla {{read of volatile-qualified type 'const volatile int' is not allowed in a constant expression}}
1176
1169
// expected-error@#dr76-vla {{variable length array declaration not allowed at file scope}}
1177
1170
}
1178
1171
@@ -1346,8 +1339,7 @@ namespace dr92 { // dr92: 4 c++17
1346
1339
// since-cxx17-note@-2 {{use 'noexcept(false)' instead}}
1347
1340
void (*p)() throw (int ) = &f; // #dr92-p
1348
1341
// since-cxx17-error@#dr92-p {{ISO C++17 does not allow dynamic exception specifications}}
1349
- // since-cxx17-note@#dr92-p {{use 'noexcept(false)' instead}}
1350
-
1342
+ // since-cxx17-note@#dr92-p {{use 'noexcept(false)' instead}}
1351
1343
// cxx98-14-error@#dr92-p {{target exception specification is not superset of source}}
1352
1344
// since-cxx17-warning@#dr92-p {{target exception specification is not superset of source}}
1353
1345
void (*q)() throw (int );
@@ -1363,11 +1355,11 @@ namespace dr92 { // dr92: 4 c++17
1363
1355
g (f);
1364
1356
// cxx98-14-error@-1 {{target exception specification is not superset of source}}
1365
1357
// since-cxx17-error@-2 {{no matching function for call to 'g'}}
1366
- // since-cxx17-note@#dr92-g {{candidate function not viable: no known conversion from 'void () throw(int, float)' to 'void (*)() throw()' for 1st argument}}
1358
+ // since-cxx17-note@#dr92-g {{candidate function not viable: no known conversion from 'void () throw(int, float)' to 'void (*)() throw()' for 1st argument}}
1367
1359
g (q);
1368
1360
// cxx98-14-error@-1 {{target exception specification is not superset of source}}
1369
1361
// since-cxx17-error@-2 {{no matching function for call to 'g'}}
1370
- // since-cxx17-note@#dr92-g {{candidate function not viable: no known conversion from 'void (*)() throw(int)' to 'void (*)() throw()' for 1st argument}}
1362
+ // since-cxx17-note@#dr92-g {{candidate function not viable: no known conversion from 'void (*)() throw(int)' to 'void (*)() throw()' for 1st argument}}
1371
1363
}
1372
1364
1373
1365
// Prior to C++17, this is OK because the exception specification is not
0 commit comments