Author: dim Date: Tue Feb 13 09:40:59 2018 New Revision: 325027 URL: http://llvm.org/viewvc/llvm-project?rev=325027&view=rev Log: Put type attributes after class keyword
Summary: Compiling `<functional>` in C++17 or higher mode results in: ``` functional:2500:1: warning: attribute '__visibility__' is ignored, place it after "class" to apply attribute to type declaration [-Wignored-attributes] _LIBCPP_TYPE_VIS ^ __config:701:46: note: expanded from macro '_LIBCPP_TYPE_VIS' # define _LIBCPP_TYPE_VIS __attribute__ ((__visibility__("default"))) ^ 1 warning generated. ``` Fix it by putting the attribute after the `class` keyword. Reviewers: EricWF, mclow.lists Reviewed By: EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D43209 Modified: libcxx/trunk/include/functional Modified: libcxx/trunk/include/functional URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/functional?rev=325027&r1=325026&r2=325027&view=diff ============================================================================== --- libcxx/trunk/include/functional (original) +++ libcxx/trunk/include/functional Tue Feb 13 09:40:59 2018 @@ -2497,8 +2497,7 @@ __search(_RandomAccessIterator1 __first1 // default searcher template<class _ForwardIterator, class _BinaryPredicate = equal_to<>> -_LIBCPP_TYPE_VIS -class default_searcher { +class _LIBCPP_TYPE_VIS default_searcher { public: _LIBCPP_INLINE_VISIBILITY default_searcher(_ForwardIterator __f, _ForwardIterator __l, _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits