2011-10-14 06:29:44 +08:00
|
|
|
// RUN: %clang_cc1 -E -std=c++11 %s -o - | FileCheck --check-prefix=CHECK-0X %s
|
2010-06-30 00:52:24 +08:00
|
|
|
// RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-NO-0X %s
|
2010-01-13 16:31:49 +08:00
|
|
|
|
2012-01-17 01:27:18 +08:00
|
|
|
#if __has_feature(cxx_atomic)
|
|
|
|
int has_atomic();
|
|
|
|
#else
|
|
|
|
int no_atomic();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// CHECK-0X: has_atomic
|
|
|
|
// CHECK-NO-0X: no_atomic
|
|
|
|
|
2010-01-13 16:31:49 +08:00
|
|
|
#if __has_feature(cxx_lambdas)
|
2011-01-26 23:36:03 +08:00
|
|
|
int has_lambdas();
|
2010-01-13 16:31:49 +08:00
|
|
|
#else
|
|
|
|
int no_lambdas();
|
|
|
|
#endif
|
|
|
|
|
2012-02-23 11:02:32 +08:00
|
|
|
// CHECK-0X: has_lambdas
|
2010-01-13 16:31:49 +08:00
|
|
|
// CHECK-NO-0X: no_lambdas
|
|
|
|
|
|
|
|
|
|
|
|
#if __has_feature(cxx_nullptr)
|
2010-01-13 16:58:42 +08:00
|
|
|
int has_nullptr();
|
2010-01-13 16:31:49 +08:00
|
|
|
#else
|
|
|
|
int no_nullptr();
|
|
|
|
#endif
|
|
|
|
|
2011-05-22 07:15:46 +08:00
|
|
|
// CHECK-0X: has_nullptr
|
2010-01-13 16:31:49 +08:00
|
|
|
// CHECK-NO-0X: no_nullptr
|
|
|
|
|
|
|
|
|
|
|
|
#if __has_feature(cxx_decltype)
|
2010-01-13 16:58:42 +08:00
|
|
|
int has_decltype();
|
2010-01-13 16:31:49 +08:00
|
|
|
#else
|
|
|
|
int no_decltype();
|
|
|
|
#endif
|
|
|
|
|
2010-01-13 16:58:42 +08:00
|
|
|
// CHECK-0X: has_decltype
|
2010-01-13 16:31:49 +08:00
|
|
|
// CHECK-NO-0X: no_decltype
|
|
|
|
|
|
|
|
|
|
|
|
#if __has_feature(cxx_auto_type)
|
2011-01-26 23:36:03 +08:00
|
|
|
int has_auto_type();
|
2010-01-13 16:31:49 +08:00
|
|
|
#else
|
|
|
|
int no_auto_type();
|
|
|
|
#endif
|
|
|
|
|
2011-02-20 20:13:05 +08:00
|
|
|
// CHECK-0X: has_auto_type
|
2010-01-13 16:31:49 +08:00
|
|
|
// CHECK-NO-0X: no_auto_type
|
|
|
|
|
|
|
|
|
2011-04-03 22:12:46 +08:00
|
|
|
#if __has_feature(cxx_trailing_return)
|
|
|
|
int has_trailing_return();
|
|
|
|
#else
|
|
|
|
int no_trailing_return();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// CHECK-0X: has_trailing_return
|
|
|
|
// CHECK-NO-0X: no_trailing_return
|
|
|
|
|
|
|
|
|
2010-01-13 16:31:49 +08:00
|
|
|
#if __has_feature(cxx_attributes)
|
2011-01-26 23:36:03 +08:00
|
|
|
int has_attributes();
|
2010-01-13 16:31:49 +08:00
|
|
|
#else
|
|
|
|
int no_attributes();
|
|
|
|
#endif
|
|
|
|
|
2011-01-26 23:36:03 +08:00
|
|
|
// CHECK-0X: has_attributes
|
2010-01-13 16:31:49 +08:00
|
|
|
// CHECK-NO-0X: no_attributes
|
|
|
|
|
|
|
|
|
|
|
|
#if __has_feature(cxx_static_assert)
|
2010-01-13 16:58:42 +08:00
|
|
|
int has_static_assert();
|
2010-01-13 16:31:49 +08:00
|
|
|
#else
|
|
|
|
int no_static_assert();
|
|
|
|
#endif
|
|
|
|
|
2010-01-13 16:58:42 +08:00
|
|
|
// CHECK-0X: has_static_assert
|
2010-01-13 16:31:49 +08:00
|
|
|
// CHECK-NO-0X: no_static_assert
|
|
|
|
|
|
|
|
#if __has_feature(cxx_deleted_functions)
|
2011-01-26 23:36:03 +08:00
|
|
|
int has_deleted_functions();
|
2010-01-13 16:31:49 +08:00
|
|
|
#else
|
|
|
|
int no_deleted_functions();
|
|
|
|
#endif
|
|
|
|
|
2011-01-26 23:36:03 +08:00
|
|
|
// CHECK-0X: has_deleted_functions
|
|
|
|
// CHECK-NO-0X: no_deleted_functions
|
2010-01-13 16:31:49 +08:00
|
|
|
|
2011-11-01 09:19:34 +08:00
|
|
|
#if __has_feature(cxx_defaulted_functions)
|
|
|
|
int has_defaulted_functions();
|
|
|
|
#else
|
|
|
|
int no_defaulted_functions();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// CHECK-0X: has_defaulted_functions
|
|
|
|
// CHECK-NO-0X: no_defaulted_functions
|
2010-01-13 16:31:49 +08:00
|
|
|
|
|
|
|
#if __has_feature(cxx_rvalue_references)
|
2011-01-26 23:36:03 +08:00
|
|
|
int has_rvalue_references();
|
2010-01-13 16:31:49 +08:00
|
|
|
#else
|
|
|
|
int no_rvalue_references();
|
|
|
|
#endif
|
|
|
|
|
2011-01-26 23:36:03 +08:00
|
|
|
// CHECK-0X: has_rvalue_references
|
|
|
|
// CHECK-NO-0X: no_rvalue_references
|
2010-01-13 16:31:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
#if __has_feature(cxx_variadic_templates)
|
2011-01-26 23:36:03 +08:00
|
|
|
int has_variadic_templates();
|
2010-01-13 16:31:49 +08:00
|
|
|
#else
|
|
|
|
int no_variadic_templates();
|
|
|
|
#endif
|
|
|
|
|
2011-01-26 23:36:03 +08:00
|
|
|
// CHECK-0X: has_variadic_templates
|
|
|
|
// CHECK-NO-0X: no_variadic_templates
|
2010-09-01 07:28:47 +08:00
|
|
|
|
|
|
|
|
|
|
|
#if __has_feature(cxx_inline_namespaces)
|
2011-01-26 23:36:03 +08:00
|
|
|
int has_inline_namespaces();
|
2010-09-01 07:28:47 +08:00
|
|
|
#else
|
|
|
|
int no_inline_namespaces();
|
|
|
|
#endif
|
|
|
|
|
2011-01-26 23:36:03 +08:00
|
|
|
// CHECK-0X: has_inline_namespaces
|
|
|
|
// CHECK-NO-0X: no_inline_namespaces
|
2011-01-27 05:25:54 +08:00
|
|
|
|
2011-04-15 23:14:40 +08:00
|
|
|
|
|
|
|
#if __has_feature(cxx_range_for)
|
|
|
|
int has_range_for();
|
|
|
|
#else
|
|
|
|
int no_range_for();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// CHECK-0X: has_range_for
|
|
|
|
// CHECK-NO-0X: no_range_for
|
|
|
|
|
|
|
|
|
2011-01-27 05:25:54 +08:00
|
|
|
#if __has_feature(cxx_reference_qualified_functions)
|
|
|
|
int has_reference_qualified_functions();
|
|
|
|
#else
|
|
|
|
int no_reference_qualified_functions();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// CHECK-0X: has_reference_qualified_functions
|
|
|
|
// CHECK-NO-0X: no_reference_qualified_functions
|
|
|
|
|
2011-02-06 04:35:30 +08:00
|
|
|
#if __has_feature(cxx_default_function_template_args)
|
|
|
|
int has_default_function_template_args();
|
|
|
|
#else
|
|
|
|
int no_default_function_template_args();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// CHECK-0X: has_default_function_template_args
|
|
|
|
// CHECK-NO-0X: no_default_function_template_args
|
|
|
|
|
2011-03-16 05:17:12 +08:00
|
|
|
#if __has_feature(cxx_noexcept)
|
|
|
|
int has_noexcept();
|
|
|
|
#else
|
|
|
|
int no_noexcept();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// CHECK-0X: has_noexcept
|
|
|
|
// CHECK-NO-0X: no_noexcept
|
|
|
|
|
2011-03-25 23:04:23 +08:00
|
|
|
#if __has_feature(cxx_override_control)
|
|
|
|
int has_override_control();
|
|
|
|
#else
|
|
|
|
int no_override_control();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// CHECK-0X: has_override_control
|
|
|
|
// CHECK-NO-0X: no_override_control
|
2011-05-06 05:57:07 +08:00
|
|
|
|
|
|
|
#if __has_feature(cxx_alias_templates)
|
|
|
|
int has_alias_templates();
|
|
|
|
#else
|
|
|
|
int no_alias_templates();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// CHECK-0X: has_alias_templates
|
|
|
|
// CHECK-NO-0X: no_alias_templates
|
2011-09-05 02:14:28 +08:00
|
|
|
|
|
|
|
#if __has_feature(cxx_implicit_moves)
|
|
|
|
int has_implicit_moves();
|
|
|
|
#else
|
|
|
|
int no_implicit_moves();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// CHECK-0X: has_implicit_moves
|
|
|
|
// CHECK-NO-0X: no_implicit_moves
|
2011-10-15 07:44:46 +08:00
|
|
|
|
|
|
|
#if __has_feature(cxx_alignas)
|
|
|
|
int has_alignas();
|
|
|
|
#else
|
|
|
|
int no_alignas();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// CHECK-0X: has_alignas
|
|
|
|
// CHECK-NO-0X: no_alignas
|
2011-11-01 09:23:44 +08:00
|
|
|
|
|
|
|
#if __has_feature(cxx_raw_string_literals)
|
|
|
|
int has_raw_string_literals();
|
|
|
|
#else
|
|
|
|
int no_raw_string_literals();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// CHECK-0X: has_raw_string_literals
|
|
|
|
// CHECK-NO-0X: no_raw_string_literals
|
|
|
|
|
|
|
|
#if __has_feature(cxx_unicode_literals)
|
|
|
|
int has_unicode_literals();
|
|
|
|
#else
|
|
|
|
int no_unicode_literals();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// CHECK-0X: has_unicode_literals
|
|
|
|
// CHECK-NO-0X: no_unicode_literals
|
2012-02-15 06:56:17 +08:00
|
|
|
|
|
|
|
#if __has_feature(cxx_constexpr)
|
|
|
|
int has_constexpr();
|
|
|
|
#else
|
|
|
|
int no_constexpr();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// CHECK-0X: has_constexpr
|
|
|
|
// CHECK-NO-0X: no_constexpr
|
2012-02-26 04:51:27 +08:00
|
|
|
|
|
|
|
#if __has_feature(cxx_generalized_initializers)
|
|
|
|
int has_generalized_initializers();
|
|
|
|
#else
|
|
|
|
int no_generalized_initializers();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// CHECK-0X: has_generalized_initializers
|
|
|
|
// CHECK-NO-0X: no_generalized_initializers
|
2012-03-04 07:51:05 +08:00
|
|
|
|
|
|
|
#if __has_feature(cxx_unrestricted_unions)
|
|
|
|
int has_unrestricted_unions();
|
|
|
|
#else
|
|
|
|
int no_unrestricted_unions();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// CHECK-0X: has_unrestricted_unions
|
|
|
|
// CHECK-NO-0X: no_unrestricted_unions
|
2012-03-09 16:41:27 +08:00
|
|
|
|
|
|
|
#if __has_feature(cxx_user_literals)
|
|
|
|
int has_user_literals();
|
|
|
|
#else
|
|
|
|
int no_user_literals();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// CHECK-0X: has_user_literals
|
|
|
|
// CHECK-NO-0X: no_user_literals
|