From 948dd664c3ed30dd853df03cb931436f280bad4a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20Storsj=C3=B6?= Date: Tue, 6 Apr 2021 10:55:33 +0300 Subject: [PATCH] [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 --- libcxx/include/experimental/functional | 6 +++--- libcxx/include/functional | 2 +- libcxx/include/utility | 2 +- libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp | 2 -- .../func.search/func.search.default/default.pass.cpp | 2 -- .../func.search/func.search.default/default.pred.pass.cpp | 2 -- 6 files changed, 5 insertions(+), 11 deletions(-) diff --git a/libcxx/include/experimental/functional b/libcxx/include/experimental/functional index c7dda22..d8f80ee 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 _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 ::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>::difference_type difference_type; typedef typename std::iterator_traits<_RandomAccessIterator1>::value_type value_type; @@ -358,7 +358,7 @@ make_boyer_moore_searcher( _RandomAccessIterator __f, _RandomAccessIterator __l, template ::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>::difference_type difference_type; typedef typename std::iterator_traits<_RandomAccessIterator1>::value_type value_type; diff --git a/libcxx/include/functional b/libcxx/include/functional index bbc2301..47449b7 100644 --- a/libcxx/include/functional +++ b/libcxx/include/functional @@ -3176,7 +3176,7 @@ __search(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1, // default searcher template> -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 181919c..e81fcbe 100644 --- a/libcxx/include/utility +++ b/libcxx/include/utility @@ -941,7 +941,7 @@ template _LIBCPP_INLINE_VAR constexpr in_place_type_t<_Tp> in_place_type{}; template -struct _LIBCPP_TYPE_VIS in_place_index_t { +struct _LIBCPP_TEMPLATE_VIS in_place_index_t { explicit in_place_index_t() = default; }; template diff --git a/libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp b/libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp index db8eb33..cfb7054 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 079dfaa..9c51b3a 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 - // // 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 c24e792..8ad0fe3 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 default_searcher { -- 2.7.4