File tree 10 files changed +17
-17
lines changed
basic/basic.lookup/basic.lookup.elab
dcl.dcl/dcl.spec/dcl.type/dcl.type.elab
10 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -6088,9 +6088,9 @@ def err_redefinition_different_concept : Error<
6088
6088
"redefinition of concept %0 with different template parameters or requirements">;
6089
6089
def err_tag_reference_non_tag : Error<
6090
6090
"%select{non-struct type|non-class type|non-union type|non-enum "
6091
- "type|typedef|type alias|template|type alias template|template "
6092
- "template argument}1 %0 cannot be referenced with a "
6093
- "%select{struct|interface|union|class|enum}2 specifier">;
6091
+ "type|typedef|type alias|template|alias template|template "
6092
+ "template argument}1 %0 cannot be referenced with the ' "
6093
+ "%select{struct|interface|union|class|enum}2' specifier">;
6094
6094
def err_tag_reference_conflict : Error<
6095
6095
"implicit declaration introduced by elaborated type conflicts with a "
6096
6096
"%select{non-struct type|non-class type|non-union type|non-enum "
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ namespace test0 {
9
9
typedef int A; // expected-note {{declared here}}
10
10
11
11
int test () {
12
- struct A a; // expected-error {{typedef 'A' cannot be referenced with a struct specifier}}
12
+ struct A a; // expected-error {{typedef 'A' cannot be referenced with the ' struct' specifier}}
13
13
return a.foo ;
14
14
}
15
15
}
@@ -18,7 +18,7 @@ namespace test0 {
18
18
template <class > class A ; // expected-note {{declared here}}
19
19
20
20
int test () {
21
- struct A a; // expected-error {{template 'A' cannot be referenced with a struct specifier}}
21
+ struct A a; // expected-error {{template 'A' cannot be referenced with the ' struct' specifier}}
22
22
return a.foo ;
23
23
}
24
24
}
Original file line number Diff line number Diff line change 2
2
3
3
struct A { typedef int type; };
4
4
template <typename T> using X = A; // expected-note {{declared here}}
5
- struct X <int >* p2; // expected-error {{type alias template 'X' cannot be referenced with a struct specifier}}
5
+ struct X <int >* p2; // expected-error {{alias template 'X' cannot be referenced with the ' struct' specifier}}
6
6
7
7
8
8
template <typename T> using Id = T; // expected-note {{declared here}}
9
9
template <template <typename > class F >
10
10
struct Y {
11
- struct F <int > i; // expected-error {{type alias template 'Id' cannot be referenced with a struct specifier}}
11
+ struct F <int > i; // expected-error {{alias template 'Id' cannot be referenced with the ' struct' specifier}}
12
12
typename F<A>::type j; // ok
13
13
14
14
// FIXME: don't produce the diagnostic both for the definition and the instantiation.
15
15
template <typename T> using U = F<char >; // expected-note 2{{declared here}}
16
- struct Y <F>::template U<char > k; // expected-error 2{{type alias template 'U' cannot be referenced with a struct specifier}}
16
+ struct Y <F>::template U<char > k; // expected-error 2{{alias template 'U' cannot be referenced with the ' struct' specifier}}
17
17
typename Y<F>::template U<char > l; // ok
18
18
};
19
19
template struct Y <Id>; // expected-note {{requested here}}
Original file line number Diff line number Diff line change @@ -759,7 +759,7 @@ namespace cwg254 { // cwg254: 2.9
759
759
typedef typename T::type type; // ok even if this is a typedef-name, because
760
760
// it's not an elaborated-type-specifier
761
761
typedef struct T ::type foo;
762
- // expected-error@-1 {{typedef 'type' cannot be referenced with a struct specifier}}
762
+ // expected-error@-1 {{typedef 'type' cannot be referenced with the ' struct' specifier}}
763
763
// expected-note@#cwg254-instantiation {{in instantiation of template class 'cwg254::A<cwg254::C>' requested here}}
764
764
// expected-note@#cwg254-C {{declared here}}
765
765
};
@@ -1264,10 +1264,10 @@ namespace cwg298 { // cwg298: 3.1
1264
1264
1265
1265
struct A a;
1266
1266
struct B b;
1267
- // expected-error@-1 {{typedef 'B' cannot be referenced with a struct specifier}}
1267
+ // expected-error@-1 {{typedef 'B' cannot be referenced with the ' struct' specifier}}
1268
1268
// expected-note@#cwg298-B {{declared here}}
1269
1269
struct C c;
1270
- // expected-error@-1 {{typedef 'C' cannot be referenced with a struct specifier}}
1270
+ // expected-error@-1 {{typedef 'C' cannot be referenced with the ' struct' specifier}}
1271
1271
// expected-note@#cwg298-C {{declared here}}
1272
1272
1273
1273
B::B () {}
Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ namespace cwg407 { // cwg407: 3.8
170
170
{
171
171
typedef struct S S; // #cwg407-typedef-S
172
172
struct S *p;
173
- // expected-error@-1 {{typedef 'S' cannot be referenced with a struct specifier}}
173
+ // expected-error@-1 {{typedef 'S' cannot be referenced with the ' struct' specifier}}
174
174
// expected-note@#cwg407-typedef-S {{declared here}}
175
175
}
176
176
}
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ namespace test7 {
174
174
175
175
// This shouldn't crash.
176
176
template <class T > class D {
177
- friend class A ; // expected-error {{template 'A' cannot be referenced with a class specifier}}
177
+ friend class A ; // expected-error {{template 'A' cannot be referenced with the ' class' specifier}}
178
178
};
179
179
template class D <int >;
180
180
}
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ namespace good { // Only good in C++98/03
43
43
44
44
namespace unsupported {
45
45
#ifndef FIXING
46
- template struct y ; // expected-error {{template 'y' cannot be referenced with a struct specifier}}
46
+ template struct y ; // expected-error {{template 'y' cannot be referenced with the ' struct' specifier}}
47
47
#endif
48
48
}
49
49
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ struct A {
7
7
8
8
template <typename T>
9
9
void f () {
10
- class A <T> ::iterator foo; // expected-error{{typedef 'iterator' cannot be referenced with a class specifier}}
10
+ class A <T> ::iterator foo; // expected-error{{typedef 'iterator' cannot be referenced with the ' class' specifier}}
11
11
}
12
12
13
13
void g () {
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ namespace aliastemplateinst {
90
90
template <typename T> struct A { };
91
91
template <typename T> using APtr = A<T*>; // expected-note{{previous use is here}}
92
92
93
- template struct APtr <int >; // expected-error{{type alias template 'APtr' cannot be referenced with a struct specifier}}
93
+ template struct APtr <int >; // expected-error{{alias template 'APtr' cannot be referenced with the ' struct' specifier}}
94
94
}
95
95
96
96
namespace DontDiagnoseInvalidTest {
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ template <template <typename> class D>
179
179
class E {
180
180
template class D <C>; // expected-error {{expected '<' after 'template'}}
181
181
template <> class D <C>; // expected-error {{cannot specialize a template template parameter}}
182
- friend class D <C>; // expected-error {{type alias template 'D' cannot be referenced with a class specifier}}
182
+ friend class D <C>; // expected-error {{alias template 'D' cannot be referenced with the ' class' specifier}}
183
183
};
184
184
#if __cplusplus <= 199711L
185
185
// expected-warning@+2 {{extension}}
You can’t perform that action at this time.
0 commit comments