Ah, sure thing. I wasn't entirely clear on the precision & recovery required for fixits. I'm away from a computer until Sunday, so I can gt to these changes then unless someone wants it done before then (either by removing the invalidity or backing out the change until I can).
Thanks, - David From: Douglas Gregor Sent: 10/20/2011 7:50 AM To: David Blaikie Cc: [email protected] Subject: Re: [cfe-commits] r142566 - /cfe/trunk/lib/Sema/SemaDecl.cpp On Oct 19, 2011, at 7:49 PM, David Blaikie wrote: > Author: dblaikie > Date: Wed Oct 19 21:49:08 2011 > New Revision: 142566 > > URL: http://llvm.org/viewvc/llvm-project?rev=142566&view=rev > Log: > FixIt insert 'static' for anonymous unions at global or namespace scope. > > Modified: > cfe/trunk/lib/Sema/SemaDecl.cpp > > Modified: cfe/trunk/lib/Sema/SemaDecl.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=142566&r1=142565&r2=142566&view=diff > ============================================================================== > --- cfe/trunk/lib/Sema/SemaDecl.cpp (original) > +++ cfe/trunk/lib/Sema/SemaDecl.cpp Wed Oct 19 21:49:08 2011 > @@ -2653,7 +2653,8 @@ > (isa<TranslationUnitDecl>(Owner) || > (isa<NamespaceDecl>(Owner) && > cast<NamespaceDecl>(Owner)->getDeclName()))) { > - Diag(Record->getLocation(), diag::err_anonymous_union_not_static); > + Diag(Record->getLocation(), diag::err_anonymous_union_not_static) > + << FixItHint::CreateInsertion(Record->getLocation(), "static "); > Invalid = true; > > // Recover by adding 'static'. Same comment as before: we must not set Invalid here, because we need to behave exactly as if the 'static' were there. - Doug _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
