1 // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
2
foo()3 void foo() {
4 }
5
foobool(int argc)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}}
tmain(T argc,S ** argv)13 int tmain(T argc, S **argv) {
14 int n;
15 return 0;
16 }
17
main(int argc,char ** argv)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'}}
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}}
26
27 #pragma omp target update from(m) // OK
28 {
29 foo();
30 }
31 return tmain(argc, argv);
32 }
33