From a55e68b7f961d6ef4551c9be9ac18a1e25c7c927 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Thu, 12 May 2011 19:52:14 +0000 Subject: [PATCH] enable __has_feature(is_standard_layout) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131240 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Lex/PPMacroExpansion.cpp | 1 + test/Lexer/has_feature_type_traits.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lib/Lex/PPMacroExpansion.cpp b/lib/Lex/PPMacroExpansion.cpp index 2d04d770f5..ce7acf7806 100644 --- a/lib/Lex/PPMacroExpansion.cpp +++ b/lib/Lex/PPMacroExpansion.cpp @@ -593,6 +593,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) { .Case("is_empty", LangOpts.CPlusPlus) .Case("is_enum", LangOpts.CPlusPlus) .Case("is_literal", LangOpts.CPlusPlus) + .Case("is_standard_layout", LangOpts.CPlusPlus) .Case("is_pod", LangOpts.CPlusPlus) .Case("is_polymorphic", LangOpts.CPlusPlus) .Case("is_trivial", LangOpts.CPlusPlus) diff --git a/test/Lexer/has_feature_type_traits.cpp b/test/Lexer/has_feature_type_traits.cpp index 3cfc602be6..c887563c2d 100644 --- a/test/Lexer/has_feature_type_traits.cpp +++ b/test/Lexer/has_feature_type_traits.cpp @@ -89,3 +89,8 @@ int is_union(); int is_literal(); #endif // CHECK: int is_literal(); + +#if __has_feature(is_standard_layout) +int is_standard_layout(); +#endif +// CHECK: int is_standard_layout(); -- 2.40.0