brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · 7366029 Raw
100 lines · cpp
1// RUN: %clang_cc1 -std=c++98 -E %s -o - | FileCheck %s2// RUN: %clang_cc1 -std=c++11 -E %s -o - | FileCheck %s --check-prefix=CHECK113// RUN: %clang_cc1 -std=c++20 -E %s -o - | FileCheck %s --check-prefix=CHECK204// RUN: %clang_cc1 -std=c++23 -E %s -o - | FileCheck %s --check-prefix=CHECK235 6// CHECK: c_static_assert7#if __has_extension(c_static_assert)8int c_static_assert();9#endif10 11// CHECK: c_generic_selections12#if __has_extension(c_generic_selections)13int c_generic_selections();14#endif15 16// CHECK: has_default_function_template_args17#if __has_extension(cxx_default_function_template_args)18int has_default_function_template_args();19#endif20 21// CHECK: has_defaulted_functions22#if __has_extension(cxx_defaulted_functions)23int has_defaulted_functions();24#endif25 26// CHECK: has_deleted_functions27#if __has_extension(cxx_deleted_functions)28int has_deleted_functions();29#endif30 31// CHECK: has_inline_namespaces32#if __has_extension(cxx_inline_namespaces)33int has_inline_namespaces();34#endif35 36// CHECK: has_lambdas37#if __has_extension(cxx_lambdas)38int has_lambdas();39#endif40 41// CHECK: has_override_control42#if __has_extension(cxx_override_control)43int has_override_control();44#endif45 46// CHECK: has_range_for47#if __has_extension(cxx_range_for)48int has_range_for();49#endif50 51// CHECK: has_reference_qualified_functions52#if __has_extension(cxx_reference_qualified_functions)53int has_reference_qualified_functions();54#endif55 56// CHECK: has_rvalue_references57#if __has_extension(cxx_rvalue_references)58int has_rvalue_references();59#endif60 61// CHECK: has_variadic_templates62#if __has_extension(cxx_variadic_templates)63int has_variadic_templates();64#endif65 66// CHECK: has_local_type_template_args67#if __has_extension(cxx_local_type_template_args)68int has_local_type_template_args();69#endif70 71// CHECK: has_binary_literals72#if __has_extension(cxx_binary_literals)73int has_binary_literals();74#endif75 76// CHECK: has_variable_templates77#if __has_extension(cxx_variable_templates)78int has_variable_templates();79#endif80 81// CHECK-NOT: has_init_captures82// CHECK11: has_init_captures83#if __has_extension(cxx_init_captures)84int has_init_captures();85#endif86 87 88// CHECK11-NOT: has_generalized_nttp89// CHECK20: has_generalized_nttp90#if __has_extension(cxx_generalized_nttp)91int has_generalized_nttp();92#endif93 94 95// CHECK20-NOT: has_explicit_this_parameter96// CHECK23: has_explicit_this_parameter97#if __has_extension(cxx_explicit_this_parameter)98int has_explicit_this_parameter();99#endif100