• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -E -std=c++11 %s -o - | FileCheck --check-prefix=CHECK-0X %s
2 // RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-NO-0X %s
3 
4 #if __has_feature(cxx_atomic)
5 int has_atomic();
6 #else
7 int no_atomic();
8 #endif
9 
10 // CHECK-0X: has_atomic
11 // CHECK-NO-0X: no_atomic
12 
13 #if __has_feature(cxx_lambdas)
14 int has_lambdas();
15 #else
16 int no_lambdas();
17 #endif
18 
19 // CHECK-0X: has_lambdas
20 // CHECK-NO-0X: no_lambdas
21 
22 
23 #if __has_feature(cxx_nullptr)
24 int has_nullptr();
25 #else
26 int no_nullptr();
27 #endif
28 
29 // CHECK-0X: has_nullptr
30 // CHECK-NO-0X: no_nullptr
31 
32 
33 #if __has_feature(cxx_decltype)
34 int has_decltype();
35 #else
36 int no_decltype();
37 #endif
38 
39 // CHECK-0X: has_decltype
40 // CHECK-NO-0X: no_decltype
41 
42 
43 #if __has_feature(cxx_decltype_incomplete_return_types)
44 int has_decltype_incomplete_return_types();
45 #else
46 int no_decltype_incomplete_return_types();
47 #endif
48 
49 // CHECK-0X: has_decltype_incomplete_return_types
50 // CHECK-NO-0X: no_decltype_incomplete_return_types
51 
52 
53 #if __has_feature(cxx_auto_type)
54 int has_auto_type();
55 #else
56 int no_auto_type();
57 #endif
58 
59 // CHECK-0X: has_auto_type
60 // CHECK-NO-0X: no_auto_type
61 
62 
63 #if __has_feature(cxx_trailing_return)
64 int has_trailing_return();
65 #else
66 int no_trailing_return();
67 #endif
68 
69 // CHECK-0X: has_trailing_return
70 // CHECK-NO-0X: no_trailing_return
71 
72 
73 #if __has_feature(cxx_attributes)
74 int has_attributes();
75 #else
76 int no_attributes();
77 #endif
78 
79 // CHECK-0X: has_attributes
80 // CHECK-NO-0X: no_attributes
81 
82 
83 #if __has_feature(cxx_static_assert)
84 int has_static_assert();
85 #else
86 int no_static_assert();
87 #endif
88 
89 // CHECK-0X: has_static_assert
90 // CHECK-NO-0X: no_static_assert
91 
92 #if __has_feature(cxx_deleted_functions)
93 int has_deleted_functions();
94 #else
95 int no_deleted_functions();
96 #endif
97 
98 // CHECK-0X: has_deleted_functions
99 // CHECK-NO-0X: no_deleted_functions
100 
101 #if __has_feature(cxx_defaulted_functions)
102 int has_defaulted_functions();
103 #else
104 int no_defaulted_functions();
105 #endif
106 
107 // CHECK-0X: has_defaulted_functions
108 // CHECK-NO-0X: no_defaulted_functions
109 
110 #if __has_feature(cxx_rvalue_references)
111 int has_rvalue_references();
112 #else
113 int no_rvalue_references();
114 #endif
115 
116 // CHECK-0X: has_rvalue_references
117 // CHECK-NO-0X: no_rvalue_references
118 
119 
120 #if __has_feature(cxx_variadic_templates)
121 int has_variadic_templates();
122 #else
123 int no_variadic_templates();
124 #endif
125 
126 // CHECK-0X: has_variadic_templates
127 // CHECK-NO-0X: no_variadic_templates
128 
129 
130 #if __has_feature(cxx_inline_namespaces)
131 int has_inline_namespaces();
132 #else
133 int no_inline_namespaces();
134 #endif
135 
136 // CHECK-0X: has_inline_namespaces
137 // CHECK-NO-0X: no_inline_namespaces
138 
139 
140 #if __has_feature(cxx_range_for)
141 int has_range_for();
142 #else
143 int no_range_for();
144 #endif
145 
146 // CHECK-0X: has_range_for
147 // CHECK-NO-0X: no_range_for
148 
149 
150 #if __has_feature(cxx_reference_qualified_functions)
151 int has_reference_qualified_functions();
152 #else
153 int no_reference_qualified_functions();
154 #endif
155 
156 // CHECK-0X: has_reference_qualified_functions
157 // CHECK-NO-0X: no_reference_qualified_functions
158 
159 #if __has_feature(cxx_default_function_template_args)
160 int has_default_function_template_args();
161 #else
162 int no_default_function_template_args();
163 #endif
164 
165 // CHECK-0X: has_default_function_template_args
166 // CHECK-NO-0X: no_default_function_template_args
167 
168 #if __has_feature(cxx_noexcept)
169 int has_noexcept();
170 #else
171 int no_noexcept();
172 #endif
173 
174 // CHECK-0X: has_noexcept
175 // CHECK-NO-0X: no_noexcept
176 
177 #if __has_feature(cxx_override_control)
178 int has_override_control();
179 #else
180 int no_override_control();
181 #endif
182 
183 // CHECK-0X: has_override_control
184 // CHECK-NO-0X: no_override_control
185 
186 #if __has_feature(cxx_alias_templates)
187 int has_alias_templates();
188 #else
189 int no_alias_templates();
190 #endif
191 
192 // CHECK-0X: has_alias_templates
193 // CHECK-NO-0X: no_alias_templates
194 
195 #if __has_feature(cxx_implicit_moves)
196 int has_implicit_moves();
197 #else
198 int no_implicit_moves();
199 #endif
200 
201 // CHECK-0X: has_implicit_moves
202 // CHECK-NO-0X: no_implicit_moves
203 
204 #if __has_feature(cxx_alignas)
205 int has_alignas();
206 #else
207 int no_alignas();
208 #endif
209 
210 // CHECK-0X: has_alignas
211 // CHECK-NO-0X: no_alignas
212 
213 #if __has_feature(cxx_raw_string_literals)
214 int has_raw_string_literals();
215 #else
216 int no_raw_string_literals();
217 #endif
218 
219 // CHECK-0X: has_raw_string_literals
220 // CHECK-NO-0X: no_raw_string_literals
221 
222 #if __has_feature(cxx_unicode_literals)
223 int has_unicode_literals();
224 #else
225 int no_unicode_literals();
226 #endif
227 
228 // CHECK-0X: has_unicode_literals
229 // CHECK-NO-0X: no_unicode_literals
230 
231 #if __has_feature(cxx_constexpr)
232 int has_constexpr();
233 #else
234 int no_constexpr();
235 #endif
236 
237 // CHECK-0X: has_constexpr
238 // CHECK-NO-0X: no_constexpr
239 
240 #if __has_feature(cxx_generalized_initializers)
241 int has_generalized_initializers();
242 #else
243 int no_generalized_initializers();
244 #endif
245 
246 // CHECK-0X: has_generalized_initializers
247 // CHECK-NO-0X: no_generalized_initializers
248 
249 #if __has_feature(cxx_unrestricted_unions)
250 int has_unrestricted_unions();
251 #else
252 int no_unrestricted_unions();
253 #endif
254 
255 // CHECK-0X: has_unrestricted_unions
256 // CHECK-NO-0X: no_unrestricted_unions
257 
258 #if __has_feature(cxx_user_literals)
259 int has_user_literals();
260 #else
261 int no_user_literals();
262 #endif
263 
264 // CHECK-0X: has_user_literals
265 // CHECK-NO-0X: no_user_literals
266 
267 #if __has_feature(cxx_local_type_template_args)
268 int has_local_type_template_args();
269 #else
270 int no_local_type_template_args();
271 #endif
272 
273 // CHECK-0X: has_local_type_template_args
274 // CHECK-NO-0X: no_local_type_template_args
275