Skip to content

Commit dfc6a19

Browse files
committed
Reword OpenMP diagnostics for style; NFC
Three different OpenMP diagnostics were starting with a capital letter, so this makes them all lowercase and updates the tests accordingly.
1 parent e558d21 commit dfc6a19

28 files changed

+177
-177
lines changed

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11335,18 +11335,18 @@ def err_omp_reduction_vla_unsupported : Error<
1133511335
def err_omp_linear_distribute_var_non_loop_iteration : Error<
1133611336
"only loop iteration variables are allowed in 'linear' clause in distribute directives">;
1133711337
def warn_omp_non_trivial_type_mapped : Warning<
11338-
"Type %0 is not trivially copyable and not guaranteed to be mapped correctly">,
11338+
"type %0 is not trivially copyable and not guaranteed to be mapped correctly">,
1133911339
InGroup<OpenMPMapping>;
1134011340
def err_omp_requires_clause_redeclaration : Error <
11341-
"Only one %0 clause can appear on a requires directive in a single translation unit">;
11341+
"only one %0 clause can appear on a requires directive in a single translation unit">;
1134211342
def note_omp_requires_previous_clause : Note <
1134311343
"%0 clause previously used here">;
1134411344
def err_omp_directive_before_requires : Error <
1134511345
"'%0' region encountered before requires directive with '%1' clause">;
1134611346
def note_omp_requires_encountered_directive : Note <
1134711347
"'%0' previously encountered here">;
1134811348
def err_omp_device_ancestor_without_requires_reverse_offload : Error <
11349-
"Device clause with ancestor device-modifier used without specifying 'requires reverse_offload'">;
11349+
"device clause with ancestor device-modifier used without specifying 'requires reverse_offload'">;
1135011350
def err_omp_invalid_scope : Error <
1135111351
"'#pragma omp %0' directive must appear only in file scope">;
1135211352
def note_omp_invalid_length_on_this_ptr_mapping : Note <

clang/test/OpenMP/distribute_firstprivate_messages.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,19 @@ int main(int argc, char **argv) {
9595
for (i = 0; i < argc; ++i) foo();
9696
#pragma omp target
9797
#pragma omp teams
98-
#pragma omp distribute firstprivate (a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-warning {{Type 'const S2' is not trivially copyable and not guaranteed to be mapped correctly}} expected-warning {{Type 'const S3' is not trivially copyable and not guaranteed to be mapped correctly}} expected-error {{incomplete type 'S1' where a complete type is required}} expected-error {{no matching constructor for initialization of 'S3'}}
98+
#pragma omp distribute firstprivate (a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-warning {{type 'const S2' is not trivially copyable and not guaranteed to be mapped correctly}} expected-warning {{type 'const S3' is not trivially copyable and not guaranteed to be mapped correctly}} expected-error {{incomplete type 'S1' where a complete type is required}} expected-error {{no matching constructor for initialization of 'S3'}}
9999
for (i = 0; i < argc; ++i) foo();
100100
#pragma omp target
101101
#pragma omp teams
102102
#pragma omp distribute firstprivate (argv[1]) // expected-error {{expected variable name}}
103103
for (i = 0; i < argc; ++i) foo();
104104
#pragma omp target
105105
#pragma omp teams
106-
#pragma omp distribute firstprivate(ba) // expected-warning {{Type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
106+
#pragma omp distribute firstprivate(ba) // expected-warning {{type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
107107
for (i = 0; i < argc; ++i) foo();
108108
#pragma omp target
109109
#pragma omp teams
110-
#pragma omp distribute firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}} expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
110+
#pragma omp distribute firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}} expected-warning {{type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
111111
for (i = 0; i < argc; ++i) foo();
112112
#pragma omp target
113113
#pragma omp teams

clang/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ int foomain(int argc, char **argv) {
119119
++k;
120120
#pragma omp target
121121
#pragma omp teams
122-
#pragma omp distribute parallel for firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-warning {{Type 'const S2' is not trivially copyable and not guaranteed to be mapped correctly}}
122+
#pragma omp distribute parallel for firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-warning {{type 'const S2' is not trivially copyable and not guaranteed to be mapped correctly}}
123123
for (int k = 0; k < argc; ++k)
124124
++k;
125125
#pragma omp target
@@ -129,7 +129,7 @@ int foomain(int argc, char **argv) {
129129
++k;
130130
#pragma omp target
131131
#pragma omp teams
132-
#pragma omp distribute parallel for firstprivate(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} expected-warning {{Type 'S4' is not trivially copyable and not guaranteed to be mapped correctly}} expected-warning {{Type 'S5' is not trivially copyable and not guaranteed to be mapped correctly}}
132+
#pragma omp distribute parallel for firstprivate(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} expected-warning {{type 'S4' is not trivially copyable and not guaranteed to be mapped correctly}} expected-warning {{type 'S5' is not trivially copyable and not guaranteed to be mapped correctly}}
133133
for (int k = 0; k < argc; ++k)
134134
++k;
135135
#pragma omp target
@@ -241,7 +241,7 @@ int main(int argc, char **argv) {
241241
foo();
242242
#pragma omp target
243243
#pragma omp teams
244-
#pragma omp distribute parallel for firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-error {{incomplete type 'S1' where a complete type is required}} expected-warning {{Type 'const S2' is not trivially copyable and not guaranteed to be mapped correctly}} expected-warning {{Type 'const S3' is not trivially copyable and not guaranteed to be mapped correctly}}
244+
#pragma omp distribute parallel for firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-error {{incomplete type 'S1' where a complete type is required}} expected-warning {{type 'const S2' is not trivially copyable and not guaranteed to be mapped correctly}} expected-warning {{type 'const S3' is not trivially copyable and not guaranteed to be mapped correctly}}
245245
for (i = 0; i < argc; ++i)
246246
foo();
247247
#pragma omp target
@@ -256,12 +256,12 @@ int main(int argc, char **argv) {
256256
foo();
257257
#pragma omp target
258258
#pragma omp teams
259-
#pragma omp distribute parallel for firstprivate(ba) // expected-warning {{Type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
259+
#pragma omp distribute parallel for firstprivate(ba) // expected-warning {{type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
260260
for (i = 0; i < argc; ++i)
261261
foo();
262262
#pragma omp target
263263
#pragma omp teams
264-
#pragma omp distribute parallel for firstprivate(ca) // expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
264+
#pragma omp distribute parallel for firstprivate(ca) // expected-warning {{type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
265265
for (i = 0; i < argc; ++i)
266266
foo();
267267
#pragma omp target
@@ -292,12 +292,12 @@ int main(int argc, char **argv) {
292292
foo();
293293
#pragma omp target
294294
#pragma omp teams
295-
#pragma omp distribute parallel for firstprivate(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} expected-warning {{Type 'S4' is not trivially copyable and not guaranteed to be mapped correctly}} expected-warning {{Type 'S5' is not trivially copyable and not guaranteed to be mapped correctly}}
295+
#pragma omp distribute parallel for firstprivate(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} expected-warning {{type 'S4' is not trivially copyable and not guaranteed to be mapped correctly}} expected-warning {{type 'S5' is not trivially copyable and not guaranteed to be mapped correctly}}
296296
for (i = 0; i < argc; ++i)
297297
foo();
298298
#pragma omp target
299299
#pragma omp teams
300-
#pragma omp distribute parallel for firstprivate(m) // expected-warning {{Type 'S3' is not trivially copyable and not guaranteed to be mapped correctly}}
300+
#pragma omp distribute parallel for firstprivate(m) // expected-warning {{type 'S3' is not trivially copyable and not guaranteed to be mapped correctly}}
301301
for (i = 0; i < argc; ++i)
302302
foo();
303303
#pragma omp target
@@ -329,13 +329,13 @@ int main(int argc, char **argv) {
329329
// expected-error@+3 {{lastprivate variable cannot be firstprivate}} expected-note@+3 {{defined as lastprivate}}
330330
#pragma omp target
331331
#pragma omp teams
332-
#pragma omp distribute parallel for lastprivate(g) firstprivate(g) // expected-warning {{Type 'S5' is not trivially copyable and not guaranteed to be mapped correctly}}
332+
#pragma omp distribute parallel for lastprivate(g) firstprivate(g) // expected-warning {{type 'S5' is not trivially copyable and not guaranteed to be mapped correctly}}
333333
for (i = 0; i < argc; ++i)
334334
foo();
335335
// expected-error@+3 {{lastprivate variable cannot be firstprivate}} expected-note@+3 {{defined as lastprivate}}
336336
#pragma omp target
337337
#pragma omp teams
338-
#pragma omp distribute parallel for lastprivate(n) firstprivate(n) // expected-error {{calling a private constructor of class 'S6'}} expected-warning {{Type 'S6' is not trivially copyable and not guaranteed to be mapped correctly}}
338+
#pragma omp distribute parallel for lastprivate(n) firstprivate(n) // expected-error {{calling a private constructor of class 'S6'}} expected-warning {{type 'S6' is not trivially copyable and not guaranteed to be mapped correctly}}
339339
for (i = 0; i < argc; ++i)
340340
foo();
341341
#pragma omp parallel

clang/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ int foomain(int argc, char **argv) {
119119
++k;
120120
#pragma omp target
121121
#pragma omp teams
122-
#pragma omp distribute parallel for lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-warning {{Type 'const S2' is not trivially copyable and not guaranteed to be mapped correctly}}
122+
#pragma omp distribute parallel for lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-warning {{type 'const S2' is not trivially copyable and not guaranteed to be mapped correctly}}
123123
for (int k = 0; k < argc; ++k)
124124
++k;
125125
#pragma omp target
@@ -129,7 +129,7 @@ int foomain(int argc, char **argv) {
129129
++k;
130130
#pragma omp target
131131
#pragma omp teams
132-
#pragma omp distribute parallel for lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}} expected-warning 2 {{Type 'S4' is not trivially copyable and not guaranteed to be mapped correctly}}
132+
#pragma omp distribute parallel for lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}} expected-warning 2 {{type 'S4' is not trivially copyable and not guaranteed to be mapped correctly}}
133133
for (int k = 0; k < argc; ++k)
134134
++k;
135135
#pragma omp target
@@ -228,7 +228,7 @@ int main(int argc, char **argv) {
228228
foo();
229229
#pragma omp target
230230
#pragma omp teams
231-
#pragma omp distribute parallel for lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} expected-error {{incomplete type 'S1' where a complete type is required}} expected-warning {{Type 'const S2' is not trivially copyable and not guaranteed to be mapped correctly}} expected-warning {{Type 'const S3' is not trivially copyable and not guaranteed to be mapped correctly}}
231+
#pragma omp distribute parallel for lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} expected-error {{incomplete type 'S1' where a complete type is required}} expected-warning {{type 'const S2' is not trivially copyable and not guaranteed to be mapped correctly}} expected-warning {{type 'const S3' is not trivially copyable and not guaranteed to be mapped correctly}}
232232
for (i = 0; i < argc; ++i)
233233
foo();
234234
#pragma omp target
@@ -243,12 +243,12 @@ int main(int argc, char **argv) {
243243
foo();
244244
#pragma omp target
245245
#pragma omp teams
246-
#pragma omp distribute parallel for lastprivate(ba) // expected-warning {{Type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
246+
#pragma omp distribute parallel for lastprivate(ba) // expected-warning {{type 'const S2[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
247247
for (i = 0; i < argc; ++i)
248248
foo();
249249
#pragma omp target
250250
#pragma omp teams
251-
#pragma omp distribute parallel for lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} expected-warning {{Type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
251+
#pragma omp distribute parallel for lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} expected-warning {{type 'const S3[5]' is not trivially copyable and not guaranteed to be mapped correctly}}
252252
for (i = 0; i < argc; ++i)
253253
foo();
254254
#pragma omp target
@@ -279,12 +279,12 @@ int main(int argc, char **argv) {
279279
foo();
280280
#pragma omp target
281281
#pragma omp teams
282-
#pragma omp distribute parallel for lastprivate(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} expected-warning {{Type 'S4' is not trivially copyable and not guaranteed to be mapped correctly}} expected-warning {{Type 'S5' is not trivially copyable and not guaranteed to be mapped correctly}}
282+
#pragma omp distribute parallel for lastprivate(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} expected-warning {{type 'S4' is not trivially copyable and not guaranteed to be mapped correctly}} expected-warning {{type 'S5' is not trivially copyable and not guaranteed to be mapped correctly}}
283283
for (i = 0; i < argc; ++i)
284284
foo();
285285
#pragma omp target
286286
#pragma omp teams
287-
#pragma omp distribute parallel for lastprivate(m) // expected-error {{'operator=' is a private member of 'S3'}} expected-warning {{Type 'S3' is not trivially copyable and not guaranteed to be mapped correctly}}
287+
#pragma omp distribute parallel for lastprivate(m) // expected-error {{'operator=' is a private member of 'S3'}} expected-warning {{type 'S3' is not trivially copyable and not guaranteed to be mapped correctly}}
288288
for (i = 0; i < argc; ++i)
289289
foo();
290290
#pragma omp target
@@ -325,13 +325,13 @@ int main(int argc, char **argv) {
325325
// expected-error@+3 {{firstprivate variable cannot be lastprivate}} expected-note@+3 {{defined as firstprivate}}
326326
#pragma omp target
327327
#pragma omp teams
328-
#pragma omp distribute parallel for firstprivate(m) lastprivate(m) // expected-warning {{Type 'S3' is not trivially copyable and not guaranteed to be mapped correctly}}
328+
#pragma omp distribute parallel for firstprivate(m) lastprivate(m) // expected-warning {{type 'S3' is not trivially copyable and not guaranteed to be mapped correctly}}
329329
for (i = 0; i < argc; ++i)
330330
foo();
331331
// expected-error@+3 {{lastprivate variable cannot be firstprivate}} expected-note@+3 {{defined as lastprivate}}
332332
#pragma omp target
333333
#pragma omp teams
334-
#pragma omp distribute parallel for lastprivate(n) firstprivate(n) // expected-error {{calling a private constructor of class 'S6'}} expected-warning {{Type 'S6' is not trivially copyable and not guaranteed to be mapped correctly}}
334+
#pragma omp distribute parallel for lastprivate(n) firstprivate(n) // expected-error {{calling a private constructor of class 'S6'}} expected-warning {{type 'S6' is not trivially copyable and not guaranteed to be mapped correctly}}
335335
for (i = 0; i < argc; ++i)
336336
foo();
337337
static int si;

clang/test/OpenMP/distribute_parallel_for_private_messages.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class S5 {
5050
#pragma omp target
5151
#pragma omp teams
5252
#pragma omp distribute parallel for private(a) private(this->a) private(s.a) // expected-error {{expected variable name or data member of current class}}
53-
for (int k = 0; k < s.a; ++k) // expected-warning {{Type 'S5' is not trivially copyable and not guaranteed to be mapped correctly}}
53+
for (int k = 0; k < s.a; ++k) // expected-warning {{type 'S5' is not trivially copyable and not guaranteed to be mapped correctly}}
5454
++s.a;
5555
return *this;
5656
}

0 commit comments

Comments
 (0)