1 // RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
3 // RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
8 bool foobool(int argc
) {
12 struct S1
; // expected-note {{declared here}}
14 int main(int argc
, char **argv
) {
16 #pragma omp target parallel device // expected-error {{expected '(' after 'device'}}
18 #pragma omp target parallel device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
20 #pragma omp target parallel device () // expected-error {{expected expression}}
22 #pragma omp target parallel device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
24 #pragma omp target parallel device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel' are ignored}}
26 #pragma omp target parallel device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
28 #pragma omp target parallel device (argc + argc)
30 #pragma omp target parallel device (k), device (argc+1) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'device' clause}}
32 #pragma omp target parallel device (S1) // expected-error {{'S1' does not refer to a value}}
34 #pragma omp target parallel device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}}
36 #pragma omp target parallel device (-10u)
38 #pragma omp target parallel device (3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}