[cfe-commits] r138969 - in /cfe/trunk: include/clang/Sema/Sema.h lib/Sema/SemaDecl.cpp lib/Sema/SemaInit.cpp test/SemaCXX/uninitialized.cpp

Richard Trieu rtrieu at google.com
Tue Sep 6 16:36:05 PDT 2011


On Tue, Sep 6, 2011 at 11:19 AM, Joerg Sonnenberger
<joerg at britannica.bec.de> wrote:
> 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
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>

I am taking a look at this now.




More information about the cfe-commits mailing list