[cfe-commits] r138969 - in /cfe/trunk: include/clang/Sema/Sema.h lib/Sema/SemaDecl.cpp lib/Sema/SemaInit.cpp test/SemaCXX/uninitialized.cpp
Joerg Sonnenberger
joerg at britannica.bec.de
Tue Sep 6 11:19:16 PDT 2011
On Thu, Sep 01, 2011 at 09:44:13PM -0000, Richard Trieu wrote:
> Author: rtrieu
> Date: Thu Sep 1 16:44:13 2011
> New Revision: 138969
>
> URL: http://llvm.org/viewvc/llvm-project?rev=138969&view=rev
> Log:
> Extend the self-reference warning to catch when a constructor references itself upon initialization, such as using itself within its own copy constructor.
This produces a regression for the NetBSD code base. Test case is:
struct foo { char a[100], *e; } bar = { .e = bar.a };
This is well-defined, since bar.a is an address, not a value depending
on the initialisation.
Joerg
More information about the cfe-commits
mailing list