[libcxx-commits] [PATCH] D144667: [libc++] Enable -Wunused-template

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 27 10:34:06 PST 2023


ldionne added inline comments.


================
Comment at: libcxx/include/__algorithm/make_projected.h:63-76
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR inline _ProjectedPred<_Pred, _Proj>
 __make_projected(_Pred& __pred, _Proj& __proj) {
   return _ProjectedPred<_Pred, _Proj>(__pred, __proj);
 }
 
 // Avoid creating the functor and just use the pristine comparator -- for certain algorithms, this would enable
 // optimizations that rely on the type of the comparator. Additionally, this results in less layers of indirection in
----------------
Those are templates, so they are implicitly inline. I would suggest not marking them at all.


================
Comment at: libcxx/include/__algorithm/make_projected.h:89
 template <class _Comp, class _Proj1, class _Proj2>
-_LIBCPP_HIDE_FROM_ABI constexpr static
+_LIBCPP_HIDE_FROM_ABI constexpr inline
 decltype(auto) __make_projected_comp(_Comp& __comp, _Proj1& __proj1, _Proj2& __proj2) {
----------------
Here too.


================
Comment at: libcxx/include/__memory/shared_ptr.h:436-439
+inline true_type __well_formed_deleter_test(int);
 
 template <class, class>
+inline false_type __well_formed_deleter_test(...);
----------------
Here too.


================
Comment at: libcxx/include/__type_traits/is_nothrow_convertible.h:30-33
+inline void __test_noexcept(_Tp) noexcept;
 
 template<typename _Fm, typename _To>
+inline bool_constant<noexcept(_VSTD::__test_noexcept<_To>(std::declval<_Fm>()))>
----------------
Here too.


================
Comment at: libcxx/src/filesystem/filesystem_common.h:51
 _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wunused-function")
+_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wunused-template")
 
----------------
Which functions in this file trigger the warning?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144667/new/

https://reviews.llvm.org/D144667



More information about the libcxx-commits mailing list