blob: da71ff6a5a9961d767521c87ba9a31dbe93955db [file] [log] [blame]
Samuel Antao686c70c2016-05-26 17:30:50 +00001// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
2
Alexey Bataeva8a9153a2017-12-29 18:07:07 +00003// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
4
Samuel Antao686c70c2016-05-26 17:30:50 +00005void foo() {
6}
7
8bool foobool(int argc) {
9 return argc;
10}
11
12struct S1; // Aexpected-note {{declared here}}
13
14template <class T, class S> // Aexpected-note {{declared here}}
15int tmain(T argc, S **argv) {
16 int n;
17 return 0;
18}
19
20int 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'}}
Samuel Antao661c0902016-05-26 17:39:58 +000023 #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}}
Samuel Antao686c70c2016-05-26 17:30:50 +000028
Samuel Antaoec172c62016-05-26 17:49:04 +000029 #pragma omp target update from(m) // OK
Samuel Antao686c70c2016-05-26 17:30:50 +000030 {
31 foo();
32 }
33 return tmain(argc, argv);
34}