[cfe-commits] r139996 - in /cfe/trunk: lib/Sema/SemaDeclCXX.cpp test/CXX/special/class.init/class.base.init/p8-0x.cpp

Richard Smith richard at metafoo.co.uk
Mon Sep 19 04:22:02 PDT 2011


On Mon, September 19, 2011 02:09, David Blaikie wrote:
> On Sun, Sep 18, 2011 at 4:14 AM, Richard Smith
> <richard-llvm at metafoo.co.uk>wrote:
>> Author: rsmith
>> Date: Sun Sep 18 06:14:50 2011
>> New Revision: 139996
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=139996&view=rev
>> Log:
>> PR10954: variant members should not be implicitly initialized in
>> constructors if no mem-initializer is specified for them, unless an in-class
>> initializer is specified.
>>
>> Modified:
>> cfe/trunk/lib/Sema/SemaDeclCXX.cpp
>> cfe/trunk/test/CXX/special/class.init/class.base.init/p8-0x.cpp
>>
>> Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=1
>> 39996&r1=139995&r2=139996&view=diff
>>
>>
>> ===========================================================================
>> ===
>> --- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
>> +++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Sun Sep 18 06:14:50 2011
>> @@ -2464,17 +2469,6 @@
>> continue; }
>>
>>
>> -      // If this field is somewhere within an anonymous union, we only
>> -      // initialize it if there's an explicit initializer.
>> -      if (isWithinAnonymousUnion(F)) {
>>
>>
>
> Seems this was the last/only use of isWithinAnonymousUnion & clang is
> warning about it being unused now:
>
> /home/dblaikie/Development/llvm/clean/llvm/tools/clang/lib/Sema/SemaDeclCXX.c
> pp:2338:13:warning:
> unused function 'isWithinAnonymousUnion' [-Wunused-function]
> static bool isWithinAnonymousUnion(IndirectFieldDecl *F) { ^
>
> Perhaps you could remove it?

Thanks for the heads-up. Removed in r140013.




More information about the cfe-commits mailing list