Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Lexer / has_extension_cxx.cpp
blob1ae6a446b300a7d8952f5a2c20a5efc8361a8c4f
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
4 // CHECK: c_static_assert
5 #if __has_extension(c_static_assert)
6 int c_static_assert();
7 #endif
9 // CHECK: c_generic_selections
10 #if __has_extension(c_generic_selections)
11 int c_generic_selections();
12 #endif
14 // CHECK: has_default_function_template_args
15 #if __has_extension(cxx_default_function_template_args)
16 int has_default_function_template_args();
17 #endif
19 // CHECK: has_defaulted_functions
20 #if __has_extension(cxx_defaulted_functions)
21 int has_defaulted_functions();
22 #endif
24 // CHECK: has_deleted_functions
25 #if __has_extension(cxx_deleted_functions)
26 int has_deleted_functions();
27 #endif
29 // CHECK: has_inline_namespaces
30 #if __has_extension(cxx_inline_namespaces)
31 int has_inline_namespaces();
32 #endif
34 // CHECK: has_override_control
35 #if __has_extension(cxx_override_control)
36 int has_override_control();
37 #endif
39 // CHECK: has_range_for
40 #if __has_extension(cxx_range_for)
41 int has_range_for();
42 #endif
44 // CHECK: has_reference_qualified_functions
45 #if __has_extension(cxx_reference_qualified_functions)
46 int has_reference_qualified_functions();
47 #endif
49 // CHECK: has_rvalue_references
50 #if __has_extension(cxx_rvalue_references)
51 int has_rvalue_references();
52 #endif
54 // CHECK: has_variadic_templates
55 #if __has_extension(cxx_variadic_templates)
56 int has_variadic_templates();
57 #endif
59 // CHECK: has_local_type_template_args
60 #if __has_extension(cxx_local_type_template_args)
61 int has_local_type_template_args();
62 #endif
64 // CHECK: has_binary_literals
65 #if __has_extension(cxx_binary_literals)
66 int has_binary_literals();
67 #endif
69 // CHECK: has_variable_templates
70 #if __has_extension(cxx_variable_templates)
71 int has_variable_templates();
72 #endif
74 // CHECK-NOT: has_init_captures
75 // CHECK11: has_init_captures
76 #if __has_extension(cxx_init_captures)
77 int has_init_captures();
78 #endif