From a41ffeaf34ed3b1d7b55e76971c4dd68efd6efff Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sat, 11 Jun 2016 01:18:16 -0400 Subject: [PATCH] Bug 480271 - Update the list of features CDT claims to support in __has_feature() __has_feature() is a clang extension for feature testing. Additions include features that we support that weren't added previously because they weren't listed in clang's documentation (such as cxx_atomic), and features for which we've since gained supprot (such as cxx_variable_templates). The addition of cxx_atomic is particularly important because it's required for CDT to parse libc++'s header correctly. Change-Id: I21a0472bb3983cf70f5b7b734827ab1111370690 --- .../core/parser/scanner/CPreprocessor.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/CPreprocessor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/CPreprocessor.java index 48dba5636cf..ed9673134bc 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/CPreprocessor.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/CPreprocessor.java @@ -2095,6 +2095,7 @@ public class CPreprocessor implements ILexerLog, IScanner, IAdaptable { sSupportedFeatures.add("cxx_alias_templates"); sSupportedFeatures.add("cxx_alignas"); sSupportedFeatures.add("cxx_alignof"); + sSupportedFeatures.add("cxx_atomic"); sSupportedFeatures.add("cxx_attributes"); sSupportedFeatures.add("cxx_auto_type"); sSupportedFeatures.add("cxx_constexpr"); @@ -2103,6 +2104,7 @@ public class CPreprocessor implements ILexerLog, IScanner, IAdaptable { sSupportedFeatures.add("cxx_default_function_template_args"); sSupportedFeatures.add("cxx_defaulted_functions"); sSupportedFeatures.add("cxx_delegating_constructors"); + sSupportedFeatures.add("cxx_deleted_functions"); sSupportedFeatures.add("cxx_explicit_conversions"); sSupportedFeatures.add("cxx_generalized_initializers"); // missing: cxx_implicit_moves (bug 327301) @@ -2128,7 +2130,15 @@ public class CPreprocessor implements ILexerLog, IScanner, IAdaptable { sSupportedFeatures.add("cxx_variadic_templates"); // C++14 features - // none supported yet + // missing: cxx_aggregate_nsdmi + // missing: cxx_binary_literals + // missing: cxx_contextual_conversions + // missing: cxx_decltype_auto (bug 408470) + // missing: cxx_generic_lambdas + // missing: cxx_init_captures (bug 413527) + // missing: cxx_relaxed_constexpr (bug 490475) + // missing: cxx_return_type_deduction (bug 408470) + sSupportedFeatures.add("cxx_variable_templates"); // C11 features sSupportedFeatures.add("c_alignas"); @@ -2163,8 +2173,11 @@ public class CPreprocessor implements ILexerLog, IScanner, IAdaptable { // missing: is_nothrow_destructible sSupportedFeatures.add("is_pod"); sSupportedFeatures.add("is_polymorphic"); + // missing: is_standard_layout + // missing: is_trivial // missing: is_trivially_assignable // missing: is_trivially_constructible + // missing: is_trivially_copyable sSupportedFeatures.add("is_union"); sSupportedFeatures.add("underlying_type"); }