1 | // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s |
2 | |
3 | // RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s |
4 | |
5 | void foo() { |
6 | } |
7 | |
8 | bool foobool(int argc) { |
9 | return argc; |
10 | } |
11 | |
12 | struct S1; // Aexpected-note {{declared here}} |
13 | |
14 | template <class T, class S> // Aexpected-note {{declared here}} |
15 | int tmain(T argc, S **argv) { |
16 | int n; |
17 | return 0; |
18 | } |
19 | |
20 | int main(int argc, char **argv) { |
21 | int m; |
22 | #pragma omp target update // expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} |
23 | #pragma omp target update to(m) { // expected-warning {{extra tokens at the end of '#pragma omp target update' are ignored}} |
24 | #pragma omp target update to(m) ( // expected-warning {{extra tokens at the end of '#pragma omp target update' are ignored}} |
25 | #pragma omp target update to(m) [ // expected-warning {{extra tokens at the end of '#pragma omp target update' are ignored}} |
26 | #pragma omp target update to(m) ] // expected-warning {{extra tokens at the end of '#pragma omp target update' are ignored}} |
27 | #pragma omp target update to(m) ) // expected-warning {{extra tokens at the end of '#pragma omp target update' are ignored}} |
28 | |
29 | #pragma omp target update from(m) allocate(m) // expected-error {{unexpected OpenMP clause 'allocate' in directive '#pragma omp target update'}} |
30 | { |
31 | foo(); |
32 | } |
33 | return tmain(argc, argv); |
34 | } |
35 | |