Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / OpenMP / openmp_attribute.cpp
blob5a9a5795f010ce70d5aac749bddda5b957d17796
1 // RUN: %clang_cc1 -fopenmp -fsyntax-only -verify -DSUPPORTED=1 %s
2 // RUN: %clang_cc1 -fopenmp -fsyntax-only -verify -DSUPPORTED=1 -x c -std=c2x %s
3 // RUN: %clang_cc1 -fsyntax-only -verify -DSUPPORTED=0 %s
4 // RUN: %clang_cc1 -fsyntax-only -verify -DSUPPORTED=0 -x c -std=c2x %s
5 // RUN: %clang_cc1 -fopenmp -fsyntax-only -verify -DSUPPORTED=1 %s
6 // RUN: %clang_cc1 -fopenmp -fsyntax-only -verify -DSUPPORTED=1 -x c -std=c2x %s
7 // expected-no-diagnostics
9 #ifndef SUPPORTED
10 #error "Someone messed up a RUN line"
11 #endif
13 #ifdef __cplusplus
14 #if __has_cpp_attribute(omp::sequence) != SUPPORTED
15 #error "No idea what you're talking about"
16 #endif
18 #if __has_cpp_attribute(omp::directive) != SUPPORTED
19 #error "No idea what you're talking about"
20 #endif
22 #if __has_cpp_attribute(omp::totally_bogus)
23 #error "No idea what you're talking about"
24 #endif
26 #else // __cplusplus
28 #if __has_c_attribute(omp::sequence) != SUPPORTED
29 #error "No idea what you're talking about"
30 #endif
32 #if __has_c_attribute(omp::directive) != SUPPORTED
33 #error "No idea what you're talking about"
34 #endif
36 #if __has_c_attribute(omp::totally_bogus)
37 #error "No idea what you're talking about"
38 #endif
40 #endif