@@ -24,16 +24,16 @@ S2 s21{.i=1, .j =2};
24
24
25
25
S2 s22 = {1 , 2 };
26
26
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: use designated initializer list to initialize 'S2' [modernize-use-designated-initializers]
27
- // CHECK-MESSAGES: :[[@LINE-6]]:1: note: this is the type to initialize
27
+ // CHECK-MESSAGES: :[[@LINE-6]]:1: note: aggregate type is defined here
28
28
// CHECK-MESSAGES-POD: :[[@LINE-3]]:10: warning: use designated initializer list to initialize 'S2' [modernize-use-designated-initializers]
29
- // CHECK-MESSAGES-POD: :[[@LINE-8]]:1: note: this is the type to initialize
29
+ // CHECK-MESSAGES-POD: :[[@LINE-8]]:1: note: aggregate type is defined here
30
30
// CHECK-FIXES: S2 s22 = {.i=1, .j=2};
31
31
32
32
S2 s23{1 };
33
33
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: use designated initializer list to initialize 'S2' [modernize-use-designated-initializers]
34
- // CHECK-MESSAGES: :[[@LINE-13]]:1: note: this is the type to initialize
34
+ // CHECK-MESSAGES: :[[@LINE-13]]:1: note: aggregate type is defined here
35
35
// CHECK-MESSAGES-POD: :[[@LINE-3]]:7: warning: use designated initializer list to initialize 'S2' [modernize-use-designated-initializers]
36
- // CHECK-MESSAGES-POD: :[[@LINE-15]]:1: note: this is the type to initialize
36
+ // CHECK-MESSAGES-POD: :[[@LINE-15]]:1: note: aggregate type is defined here
37
37
// CHECK-FIXES: S2 s23{.i=1};
38
38
39
39
S2 s24{.i = 1 };
@@ -58,20 +58,20 @@ S3 s31 = {.s2 = 1, 2, 3.1};
58
58
59
59
S3 s32 = {{.i = 1 , 2 }};
60
60
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: use designated initializer list to initialize 'S3' [modernize-use-designated-initializers]
61
- // CHECK-MESSAGES: :[[@LINE-15]]:1: note: this is the type to initialize
61
+ // CHECK-MESSAGES: :[[@LINE-15]]:1: note: aggregate type is defined here
62
62
// CHECK-MESSAGES: :[[@LINE-3]]:20: warning: use designated init expression to initialize field 'j' [modernize-use-designated-initializers]
63
63
// CHECK-MESSAGES-POD: :[[@LINE-4]]:10: warning: use designated initializer list to initialize 'S3' [modernize-use-designated-initializers]
64
- // CHECK-MESSAGES-POD: :[[@LINE-18]]:1: note: this is the type to initialize
64
+ // CHECK-MESSAGES-POD: :[[@LINE-18]]:1: note: aggregate type is defined here
65
65
// CHECK-MESSAGES-POD: :[[@LINE-6]]:20: warning: use designated init expression to initialize field 'j' [modernize-use-designated-initializers]
66
66
// CHECK-FIXES: S3 s32 = {.s2={.i = 1, .j=2}};
67
67
68
68
S3 s33 = {{2 }, .d =3.1 };
69
69
// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: use designated init expression to initialize field 's2' [modernize-use-designated-initializers]
70
70
// CHECK-MESSAGES: :[[@LINE-2]]:11: warning: use designated initializer list to initialize 'S2' [modernize-use-designated-initializers]
71
- // CHECK-MESSAGES: :[[@LINE-50]]:1: note: this is the type to initialize
71
+ // CHECK-MESSAGES: :[[@LINE-50]]:1: note: aggregate type is defined here
72
72
// CHECK-MESSAGES-POD: :[[@LINE-4]]:11: warning: use designated init expression to initialize field 's2' [modernize-use-designated-initializers]
73
73
// CHECK-MESSAGES-POD: :[[@LINE-5]]:11: warning: use designated initializer list to initialize 'S2' [modernize-use-designated-initializers]
74
- // CHECK-MESSAGES-POD: :[[@LINE-53]]:1: note: this is the type to initialize
74
+ // CHECK-MESSAGES-POD: :[[@LINE-53]]:1: note: aggregate type is defined here
75
75
// CHECK-FIXES: S3 s33 = {.s2={.i=2}, .d=3.1};
76
76
77
77
struct S4 {
@@ -81,12 +81,12 @@ struct S4 {
81
81
82
82
S4 s41 {2.2 };
83
83
// CHECK-MESSAGES-SINGLE-ELEMENT: :[[@LINE-1]]:8: warning: use designated initializer list to initialize 'S4' [modernize-use-designated-initializers]
84
- // CHECK-MESSAGES-SINGLE-ELEMENT: :[[@LINE-7]]:1: note: this is the type to initialize
84
+ // CHECK-MESSAGES-SINGLE-ELEMENT: :[[@LINE-7]]:1: note: aggregate type is defined here
85
85
// CHECK-FIXES-SINGLE-ELEMENT: S4 s41 {.d=2.2};
86
86
87
87
S4 s42 = {{}};
88
88
// CHECK-MESSAGES-SINGLE-ELEMENT: :[[@LINE-1]]:10: warning: use designated initializer list to initialize 'S4' [modernize-use-designated-initializers]
89
- // CHECK-MESSAGES-SINGLE-ELEMENT: :[[@LINE-12]]:1: note: this is the type to initialize
89
+ // CHECK-MESSAGES-SINGLE-ELEMENT: :[[@LINE-12]]:1: note: aggregate type is defined here
90
90
// CHECK-FIXES-SINGLE-ELEMENT: S4 s42 = {.d={}};
91
91
92
92
template <typename S> S template1 () { return {10 , 11 }; }
@@ -108,9 +108,9 @@ struct S6 {
108
108
109
109
S6 s61 {1 , 2 };
110
110
// CHECK-MESSAGES: :[[@LINE-1]]:8: warning: use designated initializer list to initialize 'S6' [modernize-use-designated-initializers]
111
- // CHECK-MESSAGES: :[[@LINE-7]]:1: note: this is the type to initialize
111
+ // CHECK-MESSAGES: :[[@LINE-7]]:1: note: aggregate type is defined here
112
112
// CHECK-MESSAGES-POD: :[[@LINE-3]]:8: warning: use designated initializer list to initialize 'S6' [modernize-use-designated-initializers]
113
- // CHECK-MESSAGES-POD: :[[@LINE-9]]:1: note: this is the type to initialize
113
+ // CHECK-MESSAGES-POD: :[[@LINE-9]]:1: note: aggregate type is defined here
114
114
// CHECK-FIXES: S6 s61 {.i=1, .s.j=2};
115
115
116
116
struct S7 {
@@ -122,7 +122,7 @@ struct S7 {
122
122
123
123
S7 s71 {1 };
124
124
// CHECK-MESSAGES-SINGLE-ELEMENT: :[[@LINE-1]]:8: warning: use designated initializer list to initialize 'S7' [modernize-use-designated-initializers]
125
- // CHECK-MESSAGES-SINGLE-ELEMENT: :[[@LINE-9]]:1: note: this is the type to initialize
125
+ // CHECK-MESSAGES-SINGLE-ELEMENT: :[[@LINE-9]]:1: note: aggregate type is defined here
126
126
// CHECK-FIXES-SINGLE-ELEMENT: S7 s71 {.u.k=1};
127
127
128
128
struct S8 : S7 { int i; };
@@ -136,7 +136,7 @@ struct S9 {
136
136
137
137
S9 s91{1 , 2 };
138
138
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: use designated initializer list to initialize 'S9' [modernize-use-designated-initializers]
139
- // CHECK-MESSAGES: :[[@LINE-7]]:1: note: this is the type to initialize
139
+ // CHECK-MESSAGES: :[[@LINE-7]]:1: note: aggregate type is defined here
140
140
// CHECK-FIXES: S9 s91{.i=1, .j=2};
141
141
142
142
struct S10 { int i = 1 , j = 2 ; };
@@ -150,7 +150,7 @@ struct S11 { int i; S10 s10; };
150
150
S11 s111 { .i = 1 };
151
151
S11 s112 { 1 };
152
152
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: use designated initializer list to initialize 'S11' [modernize-use-designated-initializers]
153
- // CHECK-MESSAGES: :[[@LINE-5]]:1: note: this is the type to initialize
153
+ // CHECK-MESSAGES: :[[@LINE-5]]:1: note: aggregate type is defined here
154
154
// CHECK-FIXES: S11 s112 { .i=1 };
155
155
156
156
S11 s113 { .i =1 , {}};
@@ -168,9 +168,9 @@ struct S12 {
168
168
169
169
S12 s121 {1 , 2 };
170
170
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: use designated initializer list to initialize 'S12' [modernize-use-designated-initializers]
171
- // CHECK-MESSAGES: :[[@LINE-7]]:1: note: this is the type to initialize
171
+ // CHECK-MESSAGES: :[[@LINE-7]]:1: note: aggregate type is defined here
172
172
// CHECK-MESSAGES-POD: :[[@LINE-3]]:10: warning: use designated initializer list to initialize 'S12' [modernize-use-designated-initializers]
173
- // CHECK-MESSAGES-POD: :[[@LINE-9]]:1: note: this is the type to initialize
173
+ // CHECK-MESSAGES-POD: :[[@LINE-9]]:1: note: aggregate type is defined here
174
174
// CHECK-FIXES: S12 s121 {.i=1, .j=2};
175
175
176
176
struct S13 {
@@ -183,9 +183,9 @@ struct S13 {
183
183
184
184
S13 s131 {1 , 2 };
185
185
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: use designated initializer list to initialize 'S13' [modernize-use-designated-initializers]
186
- // CHECK-MESSAGES: :[[@LINE-10]]:1: note: this is the type to initialize
186
+ // CHECK-MESSAGES: :[[@LINE-10]]:1: note: aggregate type is defined here
187
187
// CHECK-MESSAGES-POD: :[[@LINE-3]]:10: warning: use designated initializer list to initialize 'S13' [modernize-use-designated-initializers]
188
- // CHECK-MESSAGES-POD: :[[@LINE-12]]:1: note: this is the type to initialize
188
+ // CHECK-MESSAGES-POD: :[[@LINE-12]]:1: note: aggregate type is defined here
189
189
// CHECK-FIXES: S13 s131 {.k=1, .i=2};
190
190
191
191
#define A (3 +2 )
@@ -200,4 +200,4 @@ S9 s92 {A, B};
200
200
DECLARE_S93;
201
201
// CHECK-MESSAGES-MACROS: :[[@LINE-1]]:1: warning: use designated initializer list to initialize 'S9' [modernize-use-designated-initializers]
202
202
// CHECK-MESSAGES-MACROS: :[[@LINE-4]]:28: note: expanded from macro 'DECLARE_S93'
203
- // CHECK-MESSAGES-MACROS: :[[@LINE-71]]:1: note: this is the type to initialize
203
+ // CHECK-MESSAGES-MACROS: :[[@LINE-71]]:1: note: aggregate type is defined here
0 commit comments