[cfe-dev] GCC warnings in Clang build

Kim Gräsman via cfe-dev cfe-dev at lists.llvm.org
Sun Jul 8 08:48:03 PDT 2018


I just synced to ToT and I now see some unused member functions in
LLVM's tree as well. Should I expect any opposition if I remove them?

- Kim


On Sun, Jul 8, 2018 at 11:08 AM, Kim Gräsman <kim.grasman at gmail.com> wrote:
> Hi all,
>
> We have a buildbot for IWYU running an Ubuntu 16.04 setup with GCC 5.1
> (I think) and on my local Linux box I have GCC 7.2.
>
> Both setups produce warnings when building Clang -- nothing that
> appears to be a problem, but it's nagging me that the build isn't
> clean:
>
> # GCC 7.2
> llvm/include/llvm/Support/Errno.h:34:13: warning: mangled name for
> ‘decltype (F(llvm::sys::RetryAfterSignal::As ...))
> llvm::sys::RetryAfterSignal(const FailT&, const Fun&, const Args& ...)
> [with FailT = int; Fun = int(int, stat*) throw (); Args = {int,
> stat*}]’ will change in C++17 because the exception specification is
> part of a function type [-Wnoexcept-type]
>  inline auto RetryAfterSignal(const FailT &Fail, const Fun &F,
>              ^~~~~~~~~~~~~~~~
> llvm/include/llvm/ADT/STLExtras.h:908:6: warning: mangled name for
> ‘bool llvm::all_of(R&&, UnaryPredicate) [with R = llvm::StringRef&;
> UnaryPredicate = int (*)(int) throw ()]’ will change in C++17 because
> the exception specification is part of a function type
> [-Wnoexcept-type]
>  bool all_of(R &&Range, UnaryPredicate P) {
>
> # GCC 5.1
> llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp:589:16: warning: ‘virtual
> llvm::Value* {anonymous}::CGObjCGNU::GetSelector(clang::CodeGen::CodeGenFunction&,
> const clang::ObjCMethodDecl*)’ was hidden [-Woverloaded-virtual]
> llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp:1345:16: warning:   by
> ‘virtual llvm::Value*
> {anonymous}::CGObjCGNUstep2::GetSelector(clang::CodeGen::CodeGenFunction&,
> clang::Selector, const string&)’ [-Woverloaded-virtual]
> llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp:587:16: warning: ‘virtual
> llvm::Value* {anonymous}::CGObjCGNU::GetSelector(clang::CodeGen::CodeGenFunction&,
> clang::Selector)’ was hidden [-Woverloaded-virtual]
> llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp:1345:16: warning:   by
> ‘virtual llvm::Value*
> {anonymous}::CGObjCGNUstep2::GetSelector(clang::CodeGen::CodeGenFunction&,
> clang::Selector, const string&)’ [-Woverloaded-virtual]
>
> Would you consider patches for disabling -Wnoexcept-type and renaming
> one of the GetSelector member functions?
>
> Cheers,
> - Kim


More information about the cfe-dev mailing list