[cfe-dev] GCC warnings in Clang build
Kim Gräsman via cfe-dev
cfe-dev at lists.llvm.org
Sun Jul 8 02:08:43 PDT 2018
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