42 lines · cpp
1// RUN: %clang_cc1 -fopenmp -fsyntax-only -verify -DSUPPORTED=1 %s2// RUN: %clang_cc1 -fopenmp -fsyntax-only -verify -DSUPPORTED=1 -x c -std=c2x %s3// RUN: %clang_cc1 -fsyntax-only -verify -DSUPPORTED=0 %s4// RUN: %clang_cc1 -fsyntax-only -verify -DSUPPORTED=0 -x c -std=c2x %s5// RUN: %clang_cc1 -fopenmp -fsyntax-only -verify -DSUPPORTED=1 %s6// RUN: %clang_cc1 -fopenmp -fsyntax-only -verify -DSUPPORTED=1 -x c -std=c2x %s7// expected-no-diagnostics8 9#ifndef SUPPORTED10#error "Someone messed up a RUN line"11#endif12 13#ifdef __cplusplus14#if __has_cpp_attribute(omp::sequence) != SUPPORTED15#error "No idea what you're talking about"16#endif17 18#if __has_cpp_attribute(omp::directive) != SUPPORTED19#error "No idea what you're talking about"20#endif21 22#if __has_cpp_attribute(omp::totally_bogus)23#error "No idea what you're talking about"24#endif25 26#else // __cplusplus27 28#if __has_c_attribute(omp::sequence) != SUPPORTED29#error "No idea what you're talking about"30#endif31 32#if __has_c_attribute(omp::directive) != SUPPORTED33#error "No idea what you're talking about"34#endif35 36#if __has_c_attribute(omp::totally_bogus)37#error "No idea what you're talking about"38#endif39 40#endif41 42