blob: cf6c0cc611880a6a7cff5317a57c248261c426e3 [file] [log] [blame]
Douglas Gregor50a70cd2013-01-15 06:45:29 +00001// RUN: %clang_cc1 -fopenmp -verify -DFOPENMP -o - %s
2// RUN: %clang_cc1 -verify -o - %s
3// expected-no-diagnostics
4#ifdef FOPENMP
5// -fopenmp option is specified
6#ifndef _OPENMP
7#error "No _OPENMP macro is defined with -fopenmp option"
8#elsif _OPENMP != 201107
9#error "_OPENMP has incorrect value"
Alexey Bataevc6400582013-03-22 06:34:35 +000010#endif //_OPENMP
11#else
12// No -fopenmp option is specified
13#ifdef _OPENMP
14#error "_OPENMP macro is defined without -fopenmp option"
15#endif // _OPENMP
16#endif // FOPENMP
17
18// RUN: %clang_cc1 -fopenmp -verify -DFOPENMP -o - %s
19// RUN: %clang_cc1 -verify -o - %s
20// expected-no-diagnostics
21#ifdef FOPENMP
22// -fopenmp option is specified
23#ifndef _OPENMP
24#error "No _OPENMP macro is defined with -fopenmp option"
25#elsif _OPENMP != 201107
26#error "_OPENMP has incorrect value"
Alexey Bataev08f85392013-03-22 05:24:29 +000027#endif // _OPENMP
Douglas Gregor50a70cd2013-01-15 06:45:29 +000028#else
29// No -fopenmp option is specified
30#ifdef _OPENMP
31#error "_OPENMP macro is defined without -fopenmp option"
32#endif // _OPENMP
33#endif // FOPENMP
34