[cfe-dev] GCC warnings in Clang build

Kim Gräsman via cfe-dev cfe-dev at lists.llvm.org
Mon Jul 9 23:42:01 PDT 2018


Thanks, will do!

On Mon, Jul 9, 2018, 19:13 Nico Weber <thakis at chromium.org> wrote:

> gcc's Woverloaded-virtual is known noisy. I'd prefer disabling it under
> gcc (not under clang though).
>
> On Sun, Jul 8, 2018 at 5:08 AM Kim Gräsman via cfe-dev <
> cfe-dev at lists.llvm.org> 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
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180710/ffdd2067/attachment.html>


More information about the cfe-dev mailing list