[cfe-commits] r131672 - in /cfe/trunk: lib/Lex/PPMacroExpansion.cpp test/Lexer/has_feature_type_traits.cpp

Sean Hunt scshunt at csclub.uwaterloo.ca
Thu May 19 13:48:13 PDT 2011


Author: coppro
Date: Thu May 19 15:48:13 2011
New Revision: 131672

URL: http://llvm.org/viewvc/llvm-project?rev=131672&view=rev
Log:
Implement a __has_feature for __underlying_type

Modified:
    cfe/trunk/lib/Lex/PPMacroExpansion.cpp
    cfe/trunk/test/Lexer/has_feature_type_traits.cpp

Modified: cfe/trunk/lib/Lex/PPMacroExpansion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPMacroExpansion.cpp?rev=131672&r1=131671&r2=131672&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPMacroExpansion.cpp (original)
+++ cfe/trunk/lib/Lex/PPMacroExpansion.cpp Thu May 19 15:48:13 2011
@@ -602,6 +602,7 @@
            .Case("is_trivial", LangOpts.CPlusPlus)
            .Case("is_trivially_copyable", LangOpts.CPlusPlus)
            .Case("is_union", LangOpts.CPlusPlus)
+           .Case("underlying_type", LangOpts.CPlusPlus)
            .Case("tls", PP.getTargetInfo().isTLSSupported())
            .Default(false);
 }

Modified: cfe/trunk/test/Lexer/has_feature_type_traits.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/has_feature_type_traits.cpp?rev=131672&r1=131671&r2=131672&view=diff
==============================================================================
--- cfe/trunk/test/Lexer/has_feature_type_traits.cpp (original)
+++ cfe/trunk/test/Lexer/has_feature_type_traits.cpp Thu May 19 15:48:13 2011
@@ -99,3 +99,7 @@
 int is_trivially_copyable();
 #endif
 // CHECK: int is_trivially_copyable();
+
+#if __has_feature(underlying_type)
+int underlying_type();
+#endif





More information about the cfe-commits mailing list