[libcxx-commits] [libcxx] 948dd66 - [libcxx] Fix the type attribute for a couple templates

Martin Storsjö via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 6 09:54:53 PDT 2021


Author: Martin Storsjö
Date: 2021-04-06T19:54:34+03:00
New Revision: 948dd664c3ed30dd853df03cb931436f280bad4a

URL: https://github.com/llvm/llvm-project/commit/948dd664c3ed30dd853df03cb931436f280bad4a
DIFF: https://github.com/llvm/llvm-project/commit/948dd664c3ed30dd853df03cb931436f280bad4a.diff

LOG: [libcxx] Fix the type attribute for a couple templates

Use `_LIBCPP_TEMPLATE_VIS` instead of `_LIBCPP_TYPE_VIS` for a template
class.

This fixes the nodiscard_extensions.pass.cpp and a couple
func.search.default test cases when built in MSVC/DLL configurations.

Differential Revision: https://reviews.llvm.org/D99932

Added: 
    

Modified: 
    libcxx/include/experimental/functional
    libcxx/include/functional
    libcxx/include/utility
    libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp
    libcxx/test/std/utilities/function.objects/func.search/func.search.default/default.pass.cpp
    libcxx/test/std/utilities/function.objects/func.search/func.search.default/default.pred.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/include/experimental/functional b/libcxx/include/experimental/functional
index c7dda2254b39e..d8f80ee57c42b 100644
--- a/libcxx/include/experimental/functional
+++ b/libcxx/include/experimental/functional
@@ -109,7 +109,7 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS
 #if _LIBCPP_STD_VER > 11
 // default searcher
 template<class _ForwardIterator, class _BinaryPredicate = equal_to<>>
-class _LIBCPP_TYPE_VIS default_searcher {
+class _LIBCPP_TEMPLATE_VIS default_searcher {
 public:
     _LIBCPP_INLINE_VISIBILITY
     default_searcher(_ForwardIterator __f, _ForwardIterator __l,
@@ -207,7 +207,7 @@ public:
 template <class _RandomAccessIterator1,
           class _Hash = hash<typename iterator_traits<_RandomAccessIterator1>::value_type>,
           class _BinaryPredicate = equal_to<>>
-class _LIBCPP_TYPE_VIS boyer_moore_searcher {
+class _LIBCPP_TEMPLATE_VIS boyer_moore_searcher {
 private:
     typedef typename std::iterator_traits<_RandomAccessIterator1>::
diff erence_type 
diff erence_type;
     typedef typename std::iterator_traits<_RandomAccessIterator1>::value_type      value_type;
@@ -358,7 +358,7 @@ make_boyer_moore_searcher( _RandomAccessIterator __f, _RandomAccessIterator __l,
 template <class _RandomAccessIterator1,
           class _Hash = hash<typename iterator_traits<_RandomAccessIterator1>::value_type>,
           class _BinaryPredicate = equal_to<>>
-class _LIBCPP_TYPE_VIS boyer_moore_horspool_searcher {
+class _LIBCPP_TEMPLATE_VIS boyer_moore_horspool_searcher {
 private:
     typedef typename std::iterator_traits<_RandomAccessIterator1>::
diff erence_type 
diff erence_type;
     typedef typename std::iterator_traits<_RandomAccessIterator1>::value_type      value_type;

diff  --git a/libcxx/include/functional b/libcxx/include/functional
index bbc2301b6c33a..47449b7c8e22a 100644
--- a/libcxx/include/functional
+++ b/libcxx/include/functional
@@ -3176,7 +3176,7 @@ __search(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1,
 
 // default searcher
 template<class _ForwardIterator, class _BinaryPredicate = equal_to<>>
-class _LIBCPP_TYPE_VIS default_searcher {
+class _LIBCPP_TEMPLATE_VIS default_searcher {
 public:
     _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
     default_searcher(_ForwardIterator __f, _ForwardIterator __l,

diff  --git a/libcxx/include/utility b/libcxx/include/utility
index 181919c15ef2e..e81fcbe1b870c 100644
--- a/libcxx/include/utility
+++ b/libcxx/include/utility
@@ -941,7 +941,7 @@ template <class _Tp>
 _LIBCPP_INLINE_VAR constexpr in_place_type_t<_Tp> in_place_type{};
 
 template <size_t _Idx>
-struct _LIBCPP_TYPE_VIS in_place_index_t {
+struct _LIBCPP_TEMPLATE_VIS in_place_index_t {
     explicit in_place_index_t() = default;
 };
 template <size_t _Idx>

diff  --git a/libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp b/libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp
index db8eb3357966a..cfb7054d3e2d4 100644
--- a/libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp
+++ b/libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp
@@ -18,8 +18,6 @@
 // UNSUPPORTED: apple-clang-9
 // UNSUPPORTED: gcc-5
 
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
 // All entities to which libc++ applies [[nodiscard]] as an extension should
 // be tested here and in nodiscard_extensions.fail.cpp. They should also
 // be listed in `UsingLibcxx.rst` in the documentation for the extension.

diff  --git a/libcxx/test/std/utilities/function.objects/func.search/func.search.default/default.pass.cpp b/libcxx/test/std/utilities/function.objects/func.search/func.search.default/default.pass.cpp
index 079dfaa57c96b..9c51b3ac39f30 100644
--- a/libcxx/test/std/utilities/function.objects/func.search/func.search.default/default.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.search/func.search.default/default.pass.cpp
@@ -8,8 +8,6 @@
 
 // UNSUPPORTED: c++03, c++11, c++14
 
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
 // <functional>
 
 // default searcher

diff  --git a/libcxx/test/std/utilities/function.objects/func.search/func.search.default/default.pred.pass.cpp b/libcxx/test/std/utilities/function.objects/func.search/func.search.default/default.pred.pass.cpp
index c24e792eb9b9e..8ad0fe32d8d9b 100644
--- a/libcxx/test/std/utilities/function.objects/func.search/func.search.default/default.pred.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.search/func.search.default/default.pred.pass.cpp
@@ -10,8 +10,6 @@
 
 // UNSUPPORTED: c++03, c++11, c++14
 
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
 // default searcher
 // template<class _ForwardIterator, class _BinaryPredicate = equal_to<>>
 // class default_searcher {


        


More information about the libcxx-commits mailing list