[PATCH] D29877: Warn about unused static file scope function template declarations.

Marshall Clow via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 11 07:54:44 PDT 2017


On Tue, Apr 11, 2017 at 6:59 AM, Alex Lorenz via Phabricator via
cfe-commits <cfe-commits at lists.llvm.org> wrote:

> arphaman added a comment.
>
> Ah, I see. I guess if `static` is removed the warning will go away. Thanks!
>
> https://reviews.llvm.org/D29877
>
>
I would have appreciated a heads-up here, since libc++ no longer builds
with warnings-as-errors.

include/memory:

namespace __has_pointer_type_imp
{
    template <class _Up> static __two __test(...);
    template <class _Up> static char __test(typename _Up::pointer* = 0);
}

template <class _Tp>
struct __has_pointer_type
    : public integral_constant<bool,
sizeof(__has_pointer_type_imp::__test<_Tp>(0)) == 1>
{
};

That first function is not really "unused" (though clang now claims that it
is)

-- Marshall
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170411/9bfd3837/attachment.html>


More information about the cfe-commits mailing list