[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / OpenMP / predefined_macro.c
blob36ded9adfe86eabc6917aeb7cdd0e66289a95875
1 // RUN: %clang_cc1 -fopenmp -verify -DFOPENMP -o - %s
2 // RUN: %clang_cc1 -verify -o - %s
4 // RUN: %clang_cc1 -fopenmp-simd -verify -o - %s
5 // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -verify -o - %s
6 // expected-no-diagnostics
7 #ifdef FOPENMP
8 // -fopenmp option is specified
9 #ifndef _OPENMP
10 #error "No _OPENMP macro is defined with -fopenmp option"
11 #elif _OPENMP != 202011
12 #error "_OPENMP has incorrect value"
13 #endif //_OPENMP
14 #else
15 // No -fopenmp option is specified
16 #ifdef _OPENMP
17 #error "_OPENMP macro is defined without -fopenmp option"
18 #endif // _OPENMP
19 #endif // FOPENMP