/// Third - The third conversion can be a qualification conversion.
ImplicitConversionKind Third : 8;
- /// Deprecated - Whether this the deprecated conversion of a
+ /// \brief Whether this is the deprecated conversion of a
/// string literal to a pointer to non-const character data
/// (C++ 4.2p2).
unsigned DeprecatedStringLiteralToCharPtr : 1;
.Case("attribute_overloadable", true)
.Case("attribute_unavailable_with_message", true)
.Case("blocks", LangOpts.Blocks)
- .Case("cxx_attributes", LangOpts.CPlusPlus0x)
- .Case("cxx_auto_type", LangOpts.CPlusPlus0x)
- .Case("cxx_decltype", LangOpts.CPlusPlus0x)
- .Case("cxx_deleted_functions", true) // Accepted as an extension.
.Case("cxx_exceptions", LangOpts.Exceptions)
.Case("cxx_rtti", LangOpts.RTTI)
- .Case("cxx_strong_enums", LangOpts.CPlusPlus0x)
- .Case("cxx_static_assert", LangOpts.CPlusPlus0x)
- .Case("cxx_trailing_return", LangOpts.CPlusPlus0x)
.Case("enumerator_attributes", true)
.Case("objc_nonfragile_abi", LangOpts.ObjCNonFragileABI)
.Case("objc_weak_class", LangOpts.ObjCNonFragileABI)
.Case("ownership_holds", true)
.Case("ownership_returns", true)
.Case("ownership_takes", true)
- .Case("cxx_inline_namespaces", LangOpts.CPlusPlus)
+ // C++0x features
+ .Case("cxx_attributes", LangOpts.CPlusPlus0x)
+ //.Case("cxx_auto_type", false)
+ .Case("cxx_decltype", LangOpts.CPlusPlus0x)
+ .Case("cxx_deleted_functions", LangOpts.CPlusPlus0x)
+ .Case("cxx_inline_namespaces", LangOpts.CPlusPlus0x)
//.Case("cxx_lambdas", false)
//.Case("cxx_nullptr", false)
- .Case("cxx_rvalue_references", LangOpts.CPlusPlus)
- .Case("cxx_variadic_templates", LangOpts.CPlusPlus)
+ .Case("cxx_rvalue_references", LangOpts.CPlusPlus0x)
+ .Case("cxx_strong_enums", LangOpts.CPlusPlus0x)
+ .Case("cxx_static_assert", LangOpts.CPlusPlus0x)
+ .Case("cxx_trailing_return", LangOpts.CPlusPlus0x)
+ .Case("cxx_variadic_templates", LangOpts.CPlusPlus0x)
.Case("tls", PP.getTargetInfo().isTLSSupported())
.Default(false);
}
// RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-NO-0X %s
#if __has_feature(cxx_lambdas)
-int lambdas();
+int has_lambdas();
#else
int no_lambdas();
#endif
#if __has_feature(cxx_auto_type)
-int auto_type();
+int has_auto_type();
#else
int no_auto_type();
#endif
-// CHECK-0X: auto_type
+// FIXME: We don't implement "auto" well enough to turn on this feature test
+// CHECK-0X: no_auto_type
// CHECK-NO-0X: no_auto_type
#if __has_feature(cxx_attributes)
-int attributes();
+int has_attributes();
#else
int no_attributes();
#endif
-// CHECK-0X: attributes
+// CHECK-0X: has_attributes
// CHECK-NO-0X: no_attributes
// CHECK-0X: has_static_assert
// CHECK-NO-0X: no_static_assert
-// We accept this as an extension.
#if __has_feature(cxx_deleted_functions)
-int deleted_functions();
+int has_deleted_functions();
#else
int no_deleted_functions();
#endif
-// CHECK-0X: deleted_functions
-// CHECK-NO-0X: deleted_functions
+// CHECK-0X: has_deleted_functions
+// CHECK-NO-0X: no_deleted_functions
#if __has_feature(cxx_rvalue_references)
-int rvalue_references();
+int has_rvalue_references();
#else
int no_rvalue_references();
#endif
-// CHECK-0X: rvalue_references
-// CHECK-NO-0X: rvalue_references
+// CHECK-0X: has_rvalue_references
+// CHECK-NO-0X: no_rvalue_references
#if __has_feature(cxx_variadic_templates)
-int variadic_templates();
+int has_variadic_templates();
#else
int no_variadic_templates();
#endif
-// CHECK-0X: variadic_templates
-// Note: We allow variadic templates in C++98/03 with a warning.
-// CHECK-NO-0X: variadic_templates
+// CHECK-0X: has_variadic_templates
+// CHECK-NO-0X: no_variadic_templates
#if __has_feature(cxx_inline_namespaces)
-int inline_namespaces();
+int has_inline_namespaces();
#else
int no_inline_namespaces();
#endif
-// CHECK-0X: inline_namespaces
-// CHECK-NO-0X: inline_namespaces
+// CHECK-0X: has_inline_namespaces
+// CHECK-NO-0X: no_inline_namespaces