Alexey Bataev | db39021 | 2015-05-20 04:24:19 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fopenmp -verify -DFOPENMP -o - %s |
Douglas Gregor | 1517128 | 2013-01-15 06:45:29 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -verify -o - %s |
| 3 | // expected-no-diagnostics |
| 4 | #ifdef FOPENMP |
Alexey Bataev | db39021 | 2015-05-20 04:24:19 +0000 | [diff] [blame] | 5 | // -fopenmp option is specified |
Douglas Gregor | 1517128 | 2013-01-15 06:45:29 +0000 | [diff] [blame] | 6 | #ifndef _OPENMP |
| 7 | #error "No _OPENMP macro is defined with -fopenmp option" |
Alexey Bataev | c6bd891 | 2016-05-26 11:10:11 +0000 | [diff] [blame] | 8 | #elsif _OPENMP != 201107 |
Douglas Gregor | 1517128 | 2013-01-15 06:45:29 +0000 | [diff] [blame] | 9 | #error "_OPENMP has incorrect value" |
Alexey Bataev | a769e07 | 2013-03-22 06:34:35 +0000 | [diff] [blame] | 10 | #endif //_OPENMP |
| 11 | #else |
Alexey Bataev | db39021 | 2015-05-20 04:24:19 +0000 | [diff] [blame] | 12 | // No -fopenmp option is specified |
Alexey Bataev | a769e07 | 2013-03-22 06:34:35 +0000 | [diff] [blame] | 13 | #ifdef _OPENMP |
| 14 | #error "_OPENMP macro is defined without -fopenmp option" |
| 15 | #endif // _OPENMP |
| 16 | #endif // FOPENMP |
| 17 | |