[cfe-commits] r109984 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp lib/Sema/SemaDeclCXX.cpp test/SemaCXX/warn-global-constructors.cpp
John McCall
rjmccall at apple.com
Sun Aug 1 14:16:19 PDT 2010
On Aug 1, 2010, at 1:33 PM, Eli Friedman wrote:
> On Sun, Aug 1, 2010 at 1:20 PM, John McCall <rjmccall at apple.com> wrote:
>> Author: rjmccall
>> Date: Sun Aug 1 15:20:59 2010
>> New Revision: 109984
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=109984&view=rev
>> Log:
>> Make a first pass at implementing -Wglobal-constructors. I'm worried that this
>> will end up bizarrely mirroring CGExprConstant, but that might be the hazard of
>> this feature.
>
> We already have Expr::isConstantInitializer which does something very
> similar... could these be merged somehow?
Yes, absolutely; I'd forgot that we had that. I'll switch my implementation over.
> Also, it's not obvious your patch does the right thing for 'char x[] = "asdf";'.
That was a known shortcoming.
John.
More information about the cfe-commits
mailing list