1 | // RUN: %clang_cc1 -std=c++98 -E %s -o - | FileCheck %s |
2 | // RUN: %clang_cc1 -std=c++11 -E %s -o - | FileCheck %s --check-prefix=CHECK11 |
3 | |
4 | // CHECK: c_static_assert |
5 | #if __has_extension(c_static_assert) |
6 | int c_static_assert(); |
7 | #endif |
8 | |
9 | // CHECK: c_generic_selections |
10 | #if __has_extension(c_generic_selections) |
11 | int c_generic_selections(); |
12 | #endif |
13 | |
14 | // CHECK: has_deleted_functions |
15 | #if __has_extension(cxx_deleted_functions) |
16 | int has_deleted_functions(); |
17 | #endif |
18 | |
19 | // CHECK: has_inline_namespaces |
20 | #if __has_extension(cxx_inline_namespaces) |
21 | int has_inline_namespaces(); |
22 | #endif |
23 | |
24 | // CHECK: has_override_control |
25 | #if __has_extension(cxx_override_control) |
26 | int has_override_control(); |
27 | #endif |
28 | |
29 | // CHECK: has_range_for |
30 | #if __has_extension(cxx_range_for) |
31 | int has_range_for(); |
32 | #endif |
33 | |
34 | // CHECK: has_reference_qualified_functions |
35 | #if __has_extension(cxx_reference_qualified_functions) |
36 | int has_reference_qualified_functions(); |
37 | #endif |
38 | |
39 | // CHECK: has_rvalue_references |
40 | #if __has_extension(cxx_rvalue_references) |
41 | int has_rvalue_references(); |
42 | #endif |
43 | |
44 | // CHECK: has_variadic_templates |
45 | #if __has_extension(cxx_variadic_templates) |
46 | int has_variadic_templates(); |
47 | #endif |
48 | |
49 | // CHECK: has_local_type_template_args |
50 | #if __has_extension(cxx_local_type_template_args) |
51 | int has_local_type_template_args(); |
52 | #endif |
53 | |
54 | // CHECK: has_binary_literals |
55 | #if __has_extension(cxx_binary_literals) |
56 | int has_binary_literals(); |
57 | #endif |
58 | |
59 | // CHECK: has_variable_templates |
60 | #if __has_extension(cxx_variable_templates) |
61 | int has_variable_templates(); |
62 | #endif |
63 | |
64 | // CHECK-NOT: has_init_captures |
65 | // CHECK11: has_init_captures |
66 | #if __has_extension(cxx_init_captures) |
67 | int has_init_captures(); |
68 | #endif |
69 | |