[cfe-commits] r152396 - in /cfe/trunk: docs/LanguageExtensions.html lib/Lex/PPMacroExpansion.cpp test/Lexer/has_feature_cxx0x.cpp www/cxx_status.html
Richard Smith
richard-llvm at metafoo.co.uk
Fri Mar 9 00:41:27 PST 2012
Author: rsmith
Date: Fri Mar 9 02:41:27 2012
New Revision: 152396
URL: http://llvm.org/viewvc/llvm-project?rev=152396&view=rev
Log:
User-defined literals are done.
Modified:
cfe/trunk/docs/LanguageExtensions.html
cfe/trunk/lib/Lex/PPMacroExpansion.cpp
cfe/trunk/test/Lexer/has_feature_cxx0x.cpp
cfe/trunk/www/cxx_status.html
Modified: cfe/trunk/docs/LanguageExtensions.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/LanguageExtensions.html?rev=152396&r1=152395&r2=152396&view=diff
==============================================================================
--- cfe/trunk/docs/LanguageExtensions.html (original)
+++ cfe/trunk/docs/LanguageExtensions.html Fri Mar 9 02:41:27 2012
@@ -819,7 +819,7 @@
<h4 id="cxx_user_literals">C++11 user-defined literals</h4>
-<p>Use <tt>__has_feature(cxx_user_literals)</tt> to determine if support for user-defined literals is enabled. Clang does not currently support this feature.</p>
+<p>Use <tt>__has_feature(cxx_user_literals)</tt> to determine if support for user-defined literals is enabled.</p>
<h4 id="cxx_variadic_templates">C++11 variadic templates</h4>
Modified: cfe/trunk/lib/Lex/PPMacroExpansion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPMacroExpansion.cpp?rev=152396&r1=152395&r2=152396&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPMacroExpansion.cpp (original)
+++ cfe/trunk/lib/Lex/PPMacroExpansion.cpp Fri Mar 9 02:41:27 2012
@@ -640,7 +640,7 @@
.Case("c_atomic", LangOpts.C11)
.Case("c_generic_selections", LangOpts.C11)
.Case("c_static_assert", LangOpts.C11)
- // C++0x features
+ // C++11 features
.Case("cxx_access_control_sfinae", LangOpts.CPlusPlus0x)
.Case("cxx_alias_templates", LangOpts.CPlusPlus0x)
.Case("cxx_alignas", LangOpts.CPlusPlus0x)
@@ -672,7 +672,7 @@
.Case("cxx_trailing_return", LangOpts.CPlusPlus0x)
.Case("cxx_unicode_literals", LangOpts.CPlusPlus0x)
.Case("cxx_unrestricted_unions", LangOpts.CPlusPlus0x)
- //.Case("cxx_user_literals", false)
+ .Case("cxx_user_literals", LangOpts.CPlusPlus0x)
.Case("cxx_variadic_templates", LangOpts.CPlusPlus0x)
// Type traits
.Case("has_nothrow_assign", LangOpts.CPlusPlus)
Modified: cfe/trunk/test/Lexer/has_feature_cxx0x.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/has_feature_cxx0x.cpp?rev=152396&r1=152395&r2=152396&view=diff
==============================================================================
--- cfe/trunk/test/Lexer/has_feature_cxx0x.cpp (original)
+++ cfe/trunk/test/Lexer/has_feature_cxx0x.cpp Fri Mar 9 02:41:27 2012
@@ -244,3 +244,12 @@
// CHECK-0X: has_unrestricted_unions
// CHECK-NO-0X: no_unrestricted_unions
+
+#if __has_feature(cxx_user_literals)
+int has_user_literals();
+#else
+int no_user_literals();
+#endif
+
+// CHECK-0X: has_user_literals
+// CHECK-NO-0X: no_user_literals
Modified: cfe/trunk/www/cxx_status.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/www/cxx_status.html?rev=152396&r1=152395&r2=152396&view=diff
==============================================================================
--- cfe/trunk/www/cxx_status.html (original)
+++ cfe/trunk/www/cxx_status.html Fri Mar 9 02:41:27 2012
@@ -213,7 +213,7 @@
<tr>
<td>User-defined literals</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf">N2765</a></td>
- <td class="none" align="center">No</td>
+ <td class="svn" align="center">SVN</td>
</tr>
<tr>
<td>Standard Layout Types</td>
More information about the cfe-commits
mailing list