Samuel Antao | 686c70c | 2016-05-26 17:30:50 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s |
| 2 | |
| 3 | void foo() { |
| 4 | } |
| 5 | |
| 6 | bool foobool(int argc) { |
| 7 | return argc; |
| 8 | } |
| 9 | |
| 10 | struct S1; // Aexpected-note {{declared here}} |
| 11 | |
| 12 | template <class T, class S> // Aexpected-note {{declared here}} |
| 13 | int tmain(T argc, S **argv) { |
| 14 | int n; |
| 15 | return 0; |
| 16 | } |
| 17 | |
| 18 | int main(int argc, char **argv) { |
| 19 | int m; |
| 20 | #pragma omp target update // expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} |
Samuel Antao | 661c090 | 2016-05-26 17:39:58 +0000 | [diff] [blame] | 21 | #pragma omp target update to(m) { // expected-warning {{extra tokens at the end of '#pragma omp target update' are ignored}} |
| 22 | #pragma omp target update to(m) ( // expected-warning {{extra tokens at the end of '#pragma omp target update' are ignored}} |
| 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}} |
Samuel Antao | 686c70c | 2016-05-26 17:30:50 +0000 | [diff] [blame] | 26 | |
Samuel Antao | ec172c6 | 2016-05-26 17:49:04 +0000 | [diff] [blame^] | 27 | #pragma omp target update from(m) // OK |
Samuel Antao | 686c70c | 2016-05-26 17:30:50 +0000 | [diff] [blame] | 28 | { |
| 29 | foo(); |
| 30 | } |
| 31 | return tmain(argc, argv); |
| 32 | } |