Skip to content

Commit 0d1361a

Browse files
committed
fix warning group
1 parent 00e4724 commit 0d1361a

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

clang/include/clang/Basic/DiagnosticCommonKinds.td

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,12 @@ def err_omp_more_one_clause : Error<
433433
"directive '#pragma omp %0' cannot contain more than one '%1' clause%select{| with '%3' name modifier| with 'source' dependence}2">;
434434
def err_omp_required_clause : Error<
435435
"directive '#pragma omp %0' requires the '%1' clause">;
436-
def warn_omp_gpu_unsupported_clause: Warning<"clause '%0' is currently not supported on a GPU">;
437-
def warn_omp_gpu_unsupported_modifier_for_clause: Warning<"modifier '%0' is currently not supported on a GPU for the '%1' clause">;
436+
def warn_omp_gpu_unsupported_clause: Warning<
437+
"clause '%0' is currently not supported on a GPU; clause ignored">,
438+
InGroup<OpenMPClauses>;
439+
def warn_omp_gpu_unsupported_modifier_for_clause: Warning<
440+
"modifier '%0' is currently not supported on a GPU for the '%1' clause; modifier ignored">,
441+
InGroup<OpenMPClauses>;
438442

439443
// Static Analyzer Core
440444
def err_unknown_analyzer_checker_or_package : Error<

clang/test/OpenMP/amdgcn_parallel_num_threads_strict_messages.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ tx ftemplate(int n) {
1515
tx a = 0;
1616

1717
#ifdef TARGET
18-
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause}}
18+
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause; modifier ignored}}
1919
#endif
2020
#pragma omp parallel num_threads(strict: tx(20)) severity(fatal) message("msg")
2121
{
2222
}
2323

2424
short b = 1;
2525
#ifdef TARGET
26-
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause}}
26+
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause; modifier ignored}}
2727
#endif
2828
#pragma omp parallel num_threads(strict: b) severity(warning) message("msg")
2929
{
@@ -39,14 +39,14 @@ static
3939
int fstatic(int n) {
4040

4141
#ifdef TARGET
42-
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause}}
42+
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause; modifier ignored}}
4343
#endif
4444
#pragma omp target parallel num_threads(strict: n) message("msg")
4545
{
4646
}
4747

4848
#ifdef TARGET
49-
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause}}
49+
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause; modifier ignored}}
5050
#endif
5151
#pragma omp target parallel num_threads(strict: 32+n) severity(warning)
5252
{
@@ -64,15 +64,15 @@ struct S1 {
6464
int b = 1;
6565

6666
#ifdef TARGET
67-
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause}}
67+
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause; modifier ignored}}
6868
#endif
6969
#pragma omp parallel num_threads(strict: n-b) severity(warning) message("msg")
7070
{
7171
this->a = (double)b + 1.5;
7272
}
7373

7474
#ifdef TARGET
75-
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause}}
75+
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause; modifier ignored}}
7676
#endif
7777
#pragma omp parallel num_threads(strict: 1024) severity(fatal)
7878
{

clang/test/OpenMP/nvptx_parallel_num_threads_strict_messages.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ tx ftemplate(int n) {
1515
tx a = 0;
1616

1717
#ifdef TARGET
18-
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause}}
18+
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause; modifier ignored}}
1919
#endif
2020
#pragma omp parallel num_threads(strict: tx(20)) severity(fatal) message("msg")
2121
{
2222
}
2323

2424
short b = 1;
2525
#ifdef TARGET
26-
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause}}
26+
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause; modifier ignored}}
2727
#endif
2828
#pragma omp parallel num_threads(strict: b) severity(warning) message("msg")
2929
{
@@ -39,14 +39,14 @@ static
3939
int fstatic(int n) {
4040

4141
#ifdef TARGET
42-
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause}}
42+
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause; modifier ignored}}
4343
#endif
4444
#pragma omp target parallel num_threads(strict: n) message("msg")
4545
{
4646
}
4747

4848
#ifdef TARGET
49-
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause}}
49+
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause; modifier ignored}}
5050
#endif
5151
#pragma omp target parallel num_threads(strict: 32+n) severity(warning)
5252
{
@@ -64,15 +64,15 @@ struct S1 {
6464
int b = 1;
6565

6666
#ifdef TARGET
67-
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause}}
67+
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause; modifier ignored}}
6868
#endif
6969
#pragma omp parallel num_threads(strict: n-b) severity(warning) message("msg")
7070
{
7171
this->a = (double)b + 1.5;
7272
}
7373

7474
#ifdef TARGET
75-
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause}}
75+
// expected-warning@+2 {{modifier 'strict' is currently not supported on a GPU for the 'num_threads' clause; modifier ignored}}
7676
#endif
7777
#pragma omp parallel num_threads(strict: 1024) severity(fatal)
7878
{

0 commit comments

Comments
 (0)