blob: a502f16ce3ffd21fd374e385f39adba47b5f6e5f [file] [log] [blame]
Peter Collingbournec1b5fa42011-05-13 20:54:45 +00001// RUN: %clang_cc1 -E -std=c1x %s -o - | FileCheck --check-prefix=CHECK-1X %s
2// RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-NO-1X %s
3
4#if __has_feature(c_static_assert)
5int has_static_assert();
6#else
7int no_static_assert();
8#endif
9
10// CHECK-1X: has_static_assert
11// CHECK-NO-1X: no_static_assert
12
13#if __has_feature(c_generic_selections)
14int has_generic_selections();
15#else
16int no_generic_selections();
17#endif
18
19// CHECK-1X: has_generic_selections
20// CHECK-NO-1X: no_generic_selections
Peter Collingbournefd5f6862011-10-14 23:44:46 +000021
22#if __has_feature(c_alignas)
23int has_alignas();
24#else
25int no_alignas();
26#endif
27
28// CHECK-1X: has_alignas
29// CHECK-NO-1X: no_alignas
Douglas Gregor5aa6dea2011-10-28 23:02:54 +000030
31#if __STDC_VERSION__ > 199901L
32int is_c1x();
33#else
34int is_not_c1x();
35#endif
36
37// CHECK-1X: is_c1x
38// CHECK-NO-1X: is_not_c1x