blob: fe2640bbda33c3d2523baef44cbee00db3674020 [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
David Chisnall7a7ee302012-01-16 17:27:18 +00004#if __has_feature(c_atomic)
5int has_atomic();
6#else
7int no_atomic();
8#endif
9
10// CHECK-1X: has_atomic
11// CHECK-NO-1X: no_atomic
12
Peter Collingbournec1b5fa42011-05-13 20:54:45 +000013#if __has_feature(c_static_assert)
14int has_static_assert();
15#else
16int no_static_assert();
17#endif
18
19// CHECK-1X: has_static_assert
20// CHECK-NO-1X: no_static_assert
21
22#if __has_feature(c_generic_selections)
23int has_generic_selections();
24#else
25int no_generic_selections();
26#endif
27
28// CHECK-1X: has_generic_selections
29// CHECK-NO-1X: no_generic_selections
Peter Collingbournefd5f6862011-10-14 23:44:46 +000030
31#if __has_feature(c_alignas)
32int has_alignas();
33#else
34int no_alignas();
35#endif
36
37// CHECK-1X: has_alignas
38// CHECK-NO-1X: no_alignas
Douglas Gregor5aa6dea2011-10-28 23:02:54 +000039
Richard Smithe6e68b52013-04-19 17:00:31 +000040#if __has_feature(c_thread_local)
41int has_thread_local();
42#else
43int no_thread_local();
44#endif
45
46// CHECK-1X: has_thread_local
47// CHECK-NO-1X: no_thread_local
48
Douglas Gregor5aa6dea2011-10-28 23:02:54 +000049#if __STDC_VERSION__ > 199901L
50int is_c1x();
51#else
52int is_not_c1x();
53#endif
54
55// CHECK-1X: is_c1x
56// CHECK-NO-1X: is_not_c1x