<p dir="ltr">As I recall, this was intentional. The supported way to check for these is has_builtin. The has_feature support is provided only for backwards compatibility.</p>
<div class="gmail_quote">On 24 May 2016 9:59 a.m., "David Majnemer via cfe-commits" <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: majnemer<br>
Date: Tue May 24 11:53:13 2016<br>
New Revision: 270580<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=270580&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=270580&view=rev</a><br>
Log:<br>
[Lex] Support more type-traits in __has_feature<br>
<br>
It looks like we forgot to update the __has_feature support when we<br>
added some of the type traits.<br>
<br>
Modified:<br>
    cfe/trunk/lib/Lex/PPMacroExpansion.cpp<br>
    cfe/trunk/test/Lexer/has_feature_type_traits.cpp<br>
<br>
Modified: cfe/trunk/lib/Lex/PPMacroExpansion.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPMacroExpansion.cpp?rev=270580&r1=270579&r2=270580&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPMacroExpansion.cpp?rev=270580&r1=270579&r2=270580&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Lex/PPMacroExpansion.cpp (original)<br>
+++ cfe/trunk/lib/Lex/PPMacroExpansion.cpp Tue May 24 11:53:13 2016<br>
@@ -1191,8 +1191,10 @@ static bool HasFeature(const Preprocesso<br>
       .Case("has_nothrow_copy", LangOpts.CPlusPlus)<br>
       .Case("has_nothrow_constructor", LangOpts.CPlusPlus)<br>
       .Case("has_trivial_assign", LangOpts.CPlusPlus)<br>
+      .Case("has_trivial_move_assign", LangOpts.CPlusPlus)<br>
       .Case("has_trivial_copy", LangOpts.CPlusPlus)<br>
       .Case("has_trivial_constructor", LangOpts.CPlusPlus)<br>
+      .Case("has_trivial_move_constructor", LangOpts.CPlusPlus)<br>
       .Case("has_trivial_destructor", LangOpts.CPlusPlus)<br>
       .Case("has_virtual_destructor", LangOpts.CPlusPlus)<br>
       .Case("is_abstract", LangOpts.CPlusPlus)<br>
@@ -1201,14 +1203,21 @@ static bool HasFeature(const Preprocesso<br>
       .Case("is_class", LangOpts.CPlusPlus)<br>
       .Case("is_constructible", LangOpts.CPlusPlus)<br>
       .Case("is_convertible_to", LangOpts.CPlusPlus)<br>
+      .Case("is_destructible",<br>
+            LangOpts.CPlusPlus &&LangOpts.MicrosoftExt)<br>
       .Case("is_empty", LangOpts.CPlusPlus)<br>
       .Case("is_enum", LangOpts.CPlusPlus)<br>
       .Case("is_final", LangOpts.CPlusPlus)<br>
       .Case("is_literal", LangOpts.CPlusPlus)<br>
-      .Case("is_standard_layout", LangOpts.CPlusPlus)<br>
+      .Case("is_nothrow_assignable", LangOpts.CPlusPlus)<br>
+      .Case("is_nothrow_constructible", LangOpts.CPlusPlus)<br>
+      .Case("is_nothrow_destructible",<br>
+            LangOpts.CPlusPlus && LangOpts.MicrosoftExt)<br>
       .Case("is_pod", LangOpts.CPlusPlus)<br>
       .Case("is_polymorphic", LangOpts.CPlusPlus)<br>
-      .Case("is_sealed", LangOpts.MicrosoftExt)<br>
+      .Case("is_sealed",<br>
+            LangOpts.CPlusPlus && LangOpts.MicrosoftExt)<br>
+      .Case("is_standard_layout", LangOpts.CPlusPlus)<br>
       .Case("is_trivial", LangOpts.CPlusPlus)<br>
       .Case("is_trivially_assignable", LangOpts.CPlusPlus)<br>
       .Case("is_trivially_constructible", LangOpts.CPlusPlus)<br>
<br>
Modified: cfe/trunk/test/Lexer/has_feature_type_traits.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/has_feature_type_traits.cpp?rev=270580&r1=270579&r2=270580&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/has_feature_type_traits.cpp?rev=270580&r1=270579&r2=270580&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Lexer/has_feature_type_traits.cpp (original)<br>
+++ cfe/trunk/test/Lexer/has_feature_type_traits.cpp Tue May 24 11:53:13 2016<br>
@@ -20,6 +20,16 @@ int has_trivial_assign();<br>
 #endif<br>
 // CHECK: int has_trivial_assign();<br>
<br>
+#if __has_feature(has_trivial_move_assign)<br>
+int has_trivial_move_assign();<br>
+#endif<br>
+// CHECK: int has_trivial_move_assign();<br>
+<br>
+#if __has_feature(has_trivial_move_constructor)<br>
+int has_trivial_move_constructor();<br>
+#endif<br>
+// CHECK: int has_trivial_move_constructor();<br>
+<br>
 #if __has_feature(has_trivial_copy)<br>
 int has_trivial_copy();<br>
 #endif<br>
@@ -105,6 +115,16 @@ int is_literal();<br>
 #endif<br>
 // CHECK: int is_literal();<br>
<br>
+#if __has_feature(is_nothrow_assignable)<br>
+int is_nothrow_assignable();<br>
+#endif<br>
+// CHECK: int is_nothrow_assignable();<br>
+<br>
+#if __has_feature(is_nothrow_constructible)<br>
+int is_nothrow_constructible();<br>
+#endif<br>
+// CHECK: int is_nothrow_constructible();<br>
+<br>
 #if __has_feature(is_standard_layout)<br>
 int is_standard_layout();<br>
 #endif<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>