]> granicus.if.org Git - clang/commitdiff
enable __has_feature(is_standard_layout)
authorHoward Hinnant <hhinnant@apple.com>
Thu, 12 May 2011 19:52:14 +0000 (19:52 +0000)
committerHoward Hinnant <hhinnant@apple.com>
Thu, 12 May 2011 19:52:14 +0000 (19:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131240 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/PPMacroExpansion.cpp
test/Lexer/has_feature_type_traits.cpp

index 2d04d770f58ee8517730693b4d1ee0d0f5afb867..ce7acf7806f6cbaa25cd835eecff10af9d0f790b 100644 (file)
@@ -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)
index 3cfc602be6f71746cba165e78d932012048ba773..c887563c2dd8250f07c01a915d5ac35a56fd38bf 100644 (file)
@@ -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();