1 // RUN: %clang_cc1 -verify -fopenmp %s 2 foo()3void foo() { 4 } 5 foobool(int argc)6bool foobool(int argc) { 7 return argc; 8 } 9 10 struct S1; // expected-note {{declared here}} 11 main(int argc,char ** argv)12int main(int argc, char **argv) { 13 int i; 14 #pragma omp target parallel for simd device // expected-error {{expected '(' after 'device'}} 15 for (i = 0; i < argc; ++i) foo(); 16 #pragma omp target parallel for simd device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} 17 for (i = 0; i < argc; ++i) foo(); 18 #pragma omp target parallel for simd device () // expected-error {{expected expression}} 19 for (i = 0; i < argc; ++i) foo(); 20 #pragma omp target parallel for simd device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} 21 for (i = 0; i < argc; ++i) foo(); 22 #pragma omp target parallel for simd device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}} 23 for (i = 0; i < argc; ++i) foo(); 24 #pragma omp target parallel for simd device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} 25 for (i = 0; i < argc; ++i) foo(); 26 #pragma omp target parallel for simd device (argc + argc) 27 for (i = 0; i < argc; ++i) foo(); 28 #pragma omp target parallel for simd device (argc), device (argc+1) // expected-error {{directive '#pragma omp target parallel for simd' cannot contain more than one 'device' clause}} 29 for (i = 0; i < argc; ++i) foo(); 30 #pragma omp target parallel for simd device (S1) // expected-error {{'S1' does not refer to a value}} 31 for (i = 0; i < argc; ++i) foo(); 32 #pragma omp target parallel for simd device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}} 33 for (i = 0; i < argc; ++i) foo(); 34 #pragma omp target parallel for simd device (-10u) 35 for (i = 0; i < argc; ++i) foo(); 36 #pragma omp target parallel for simd device (3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}} 37 for (i = 0; i < argc; ++i) foo(); 38 39 return 0; 40 } 41