[clang] 80e2c58 - [clang] Remove redundant member initialization (NFC)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 10 09:31:40 PST 2022


Hi Martin,

I've reverted the patch as 7485e6c7e9c7d484ba1faf2dc53c9b598286455b.  Thank
you for reporting the problem!

Kazu Hirata


On Mon, Jan 10, 2022 at 3:35 AM Martin Storsjö <martin at martin.st> wrote:

> On Sun, 9 Jan 2022, Kazu Hirata via cfe-commits wrote:
>
> >
> > Author: Kazu Hirata
> > Date: 2022-01-09T00:19:51-08:00
> > New Revision: 80e2c587498a7b2bf14dde47a33a058da6e88a9a
> >
> > URL:
> https://github.com/llvm/llvm-project/commit/80e2c587498a7b2bf14dde47a33a058da6e88a9a
> > DIFF:
> https://github.com/llvm/llvm-project/commit/80e2c587498a7b2bf14dde47a33a058da6e88a9a.diff
> >
> > LOG: [clang] Remove redundant member initialization (NFC)
> >
> > Identified with readability-redundant-member-init.
>
> While technically NFC, this causes lots of build warnings (689 warnings)
> when built with GCC, like this:
>
> In file included from
> llvm-project/clang/include/clang/Basic/SourceManager.h:37:0,
>                   from
> llvm-project/clang/lib/Lex/ScratchBuffer.cpp:14:
> llvm-project/clang/include/clang/Basic/Diagnostic.h: In
> copy constructor ‘clang::DiagnosticBuilder::DiagnosticBuilder(const
> clang::DiagnosticBuilder&)’:
> llvm-project/clang/include/clang/Basic/Diagnostic.h:1329:3:
> warning: base class ‘class clang::StreamingDiagnostic’ should be
> explicitly initialized in the copy constructor [-Wextra]
>     DiagnosticBuilder(const DiagnosticBuilder &D) {
>     ^~~~~~~~~~~~~~~~~
>
>
> With that in mind, I would like to revert this commit - is that ok with
> you?
>
> // Martin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220110/516ecf25/attachment.html>


More information about the cfe-commits mailing list