Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / OpenMP / masked_taskloop_simd_final_messages.cpp
blob3efd1d8f3620418cf04a8189448679a4e02008ec
1 // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
3 // RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
5 void foo() {
8 bool foobool(int argc) {
9 return argc;
12 struct S1; // expected-note {{declared here}}
14 template <class T, class S> // expected-note {{declared here}}
15 int tmain(T argc, S **argv) {
16 T z;
17 #pragma omp masked taskloop simd final // expected-error {{expected '(' after 'final'}}
18 for (int i = 0; i < 10; ++i)
19 foo();
20 #pragma omp masked taskloop simd final( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
21 for (int i = 0; i < 10; ++i)
22 foo();
23 #pragma omp masked taskloop simd final() // expected-error {{expected expression}}
24 for (int i = 0; i < 10; ++i)
25 foo();
26 #pragma omp masked taskloop simd final(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
27 for (int i = 0; i < 10; ++i)
28 foo();
29 #pragma omp masked taskloop simd final(argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp masked taskloop simd' are ignored}}
30 for (int i = 0; i < 10; ++i)
31 foo();
32 #pragma omp masked taskloop simd final(argc > 0 ? argv[1] : argv[2])
33 for (int i = 0; i < 10; ++i)
34 foo();
35 #pragma omp masked taskloop simd final(foobool(argc)), final(true) // expected-error {{directive '#pragma omp masked taskloop simd' cannot contain more than one 'final' clause}}
36 for (int i = 0; i < 10; ++i)
37 foo();
38 #pragma omp masked taskloop simd final(S) // expected-error {{'S' does not refer to a value}}
39 for (int i = 0; i < 10; ++i)
40 foo();
41 #pragma omp masked taskloop simd final(argv[1] = 2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
42 for (int i = 0; i < 10; ++i)
43 foo();
44 #pragma omp masked taskloop simd final(argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
45 for (int i = 0; i < 10; ++i)
46 foo();
47 #pragma omp masked taskloop simd final(argc)
48 for (int i = 0; i < 10; ++i)
49 foo();
51 return 0;
54 int main(int argc, char **argv) {
55 int z;
56 int tid = 0;
57 #pragma omp masked taskloop simd filter(tid) final // expected-error {{expected '(' after 'final'}}
58 for (int i = 0; i < 10; ++i)
59 foo();
60 #pragma omp masked taskloop simd final( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
61 for (int i = 0; i < 10; ++i)
62 foo();
63 #pragma omp masked taskloop simd final() // expected-error {{expected expression}}
64 for (int i = 0; i < 10; ++i)
65 foo();
66 #pragma omp masked taskloop simd final(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
67 for (int i = 0; i < 10; ++i)
68 foo();
69 #pragma omp masked taskloop simd final(z+argc)) // expected-warning {{extra tokens at the end of '#pragma omp masked taskloop simd' are ignored}}
70 for (int i = 0; i < 10; ++i)
71 foo();
72 #pragma omp masked taskloop simd final(argc > 0 ? argv[1] : argv[2])
73 for (int i = 0; i < 10; ++i)
74 foo();
75 #pragma omp masked taskloop simd final(foobool(argc)), final(true) // expected-error {{directive '#pragma omp masked taskloop simd' cannot contain more than one 'final' clause}}
76 for (int i = 0; i < 10; ++i)
77 foo();
78 #pragma omp masked taskloop simd final(S1) // expected-error {{'S1' does not refer to a value}}
79 for (int i = 0; i < 10; ++i)
80 foo();
81 #pragma omp masked taskloop simd final(argv[1] = 2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
82 for (int i = 0; i < 10; ++i)
83 foo();
84 #pragma omp masked taskloop simd final(argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
85 for (int i = 0; i < 10; ++i)
86 foo();
87 #pragma omp masked taskloop simd final(1 0) // expected-error {{expected ')'}} expected-note {{to match this '('}}
88 for (int i = 0; i < 10; ++i)
89 foo();
90 #pragma omp masked taskloop simd final(if (tmain(argc, argv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
91 for (int i = 0; i < 10; ++i)
92 foo();
94 return tmain(argc, argv);