diff options
Diffstat (limited to 'test/Lexer/has_feature_c1x.c')
-rw-r--r-- | test/Lexer/has_feature_c1x.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Lexer/has_feature_c1x.c b/test/Lexer/has_feature_c1x.c index ca4e9b9..c9a5f56 100644 --- a/test/Lexer/has_feature_c1x.c +++ b/test/Lexer/has_feature_c1x.c @@ -1,6 +1,15 @@ // RUN: %clang_cc1 -E -std=c1x %s -o - | FileCheck --check-prefix=CHECK-1X %s // RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-NO-1X %s +#if __has_feature(c_atomic) +int has_atomic(); +#else +int no_atomic(); +#endif + +// CHECK-1X: has_atomic +// CHECK-NO-1X: no_atomic + #if __has_feature(c_static_assert) int has_static_assert(); #else @@ -27,3 +36,12 @@ int no_alignas(); // CHECK-1X: has_alignas // CHECK-NO-1X: no_alignas + +#if __STDC_VERSION__ > 199901L +int is_c1x(); +#else +int is_not_c1x(); +#endif + +// CHECK-1X: is_c1x +// CHECK-NO-1X: is_not_c1x |