r191549 - Mark variable template implementation as complete. Nearly all of the credit
Richard Smith
richard-llvm at metafoo.co.uk
Fri Sep 27 13:19:41 PDT 2013
Author: rsmith
Date: Fri Sep 27 15:19:41 2013
New Revision: 191549
URL: http://llvm.org/viewvc/llvm-project?rev=191549&view=rev
Log:
Mark variable template implementation as complete. Nearly all of the credit
here goes to Larisse Voufo.
Modified:
cfe/trunk/lib/Lex/PPMacroExpansion.cpp
cfe/trunk/test/Lexer/has_extension_cxx.cpp
cfe/trunk/test/Lexer/has_feature_cxx0x.cpp
cfe/trunk/www/cxx_status.html
Modified: cfe/trunk/lib/Lex/PPMacroExpansion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPMacroExpansion.cpp?rev=191549&r1=191548&r2=191549&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPMacroExpansion.cpp (original)
+++ cfe/trunk/lib/Lex/PPMacroExpansion.cpp Fri Sep 27 15:19:41 2013
@@ -961,7 +961,7 @@ static bool HasFeature(const Preprocesso
.Case("cxx_relaxed_constexpr", LangOpts.CPlusPlus1y)
.Case("cxx_return_type_deduction", LangOpts.CPlusPlus1y)
//.Case("cxx_runtime_array", LangOpts.CPlusPlus1y)
- //.Case("cxx_variable_templates", LangOpts.CPlusPlus1y)
+ .Case("cxx_variable_templates", LangOpts.CPlusPlus1y)
// Type traits
.Case("has_nothrow_assign", LangOpts.CPlusPlus)
.Case("has_nothrow_copy", LangOpts.CPlusPlus)
@@ -1036,6 +1036,7 @@ static bool HasExtension(const Preproces
.Case("cxx_rvalue_references", LangOpts.CPlusPlus)
// C++1y features supported by other languages as extensions.
.Case("cxx_binary_literals", true)
+ .Case("cxx_variable_templates", true)
.Default(false);
}
Modified: cfe/trunk/test/Lexer/has_extension_cxx.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/has_extension_cxx.cpp?rev=191549&r1=191548&r2=191549&view=diff
==============================================================================
--- cfe/trunk/test/Lexer/has_extension_cxx.cpp (original)
+++ cfe/trunk/test/Lexer/has_extension_cxx.cpp Fri Sep 27 15:19:41 2013
@@ -40,16 +40,17 @@ int has_reference_qualified_functions();
int has_rvalue_references();
#endif
+// CHECK: has_local_type_template_args
#if __has_extension(cxx_local_type_template_args)
int has_local_type_template_args();
-#else
-int no_local_type_template_args();
#endif
-// CHECK: has_local_type_template_args
-
+// CHECK: has_binary_literals
#if __has_extension(cxx_binary_literals)
int has_binary_literals();
#endif
-// CHECK: has_binary_literals
+// CHECK: has_variable_templates
+#if __has_extension(cxx_variable_templates)
+int has_variable_templates();
+#endif
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=191549&r1=191548&r2=191549&view=diff
==============================================================================
--- cfe/trunk/test/Lexer/has_feature_cxx0x.cpp (original)
+++ cfe/trunk/test/Lexer/has_feature_cxx0x.cpp Fri Sep 27 15:19:41 2013
@@ -376,3 +376,13 @@ int no_relaxed_constexpr();
// CHECK-1Y: has_relaxed_constexpr
// CHECK-11: no_relaxed_constexpr
// CHECK-NO-11: no_relaxed_constexpr
+
+#if __has_feature(cxx_variable_templates)
+int has_variable_templates();
+#else
+int no_variable_templates();
+#endif
+
+// CHECK-1Y: has_variable_templates
+// CHECK-11: no_variable_templates
+// CHECK-NO-11: no_variable_templates
Modified: cfe/trunk/www/cxx_status.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/www/cxx_status.html?rev=191549&r1=191548&r2=191549&view=diff
==============================================================================
--- cfe/trunk/www/cxx_status.html (original)
+++ cfe/trunk/www/cxx_status.html Fri Sep 27 15:19:41 2013
@@ -451,7 +451,7 @@ available.</p>
<tr>
<td>Variable templates</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3651.pdf">N3651</a></td>
- <td class="partial" align="center">Partial</td>
+ <td class="svn" align="center">SVN</td>
</tr>
<tr>
<td>Relaxing requirements on constexpr functions</td>
More information about the cfe-commits
mailing list