[lld] r198641 - Rename parameters to fix shadow warnings.

Rui Ueyama ruiu at google.com
Mon Jan 6 14:48:29 PST 2014


Thank you for reviewing. Done in r198642.


On Mon, Jan 6, 2014 at 2:40 PM, Nick Kledzik <kledzik at apple.com> wrote:

>
> On Jan 6, 2014, at 2:31 PM, Rui Ueyama <ruiu at google.com> wrote:
> > Author: ruiu
> > Date: Mon Jan  6 16:31:01 2014
> > New Revision: 198641
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=198641&view=rev
> > Log:
> > Rename parameters to fix shadow warnings.
> >
> > Modified:
> >    lld/trunk/lib/ReaderWriter/PECOFF/EdataPass.h
> >
> > Modified: lld/trunk/lib/ReaderWriter/PECOFF/EdataPass.h
> > URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/EdataPass.h?rev=198641&r1=198640&r2=198641&view=diff
> >
> ==============================================================================
> > --- lld/trunk/lib/ReaderWriter/PECOFF/EdataPass.h (original)
> > +++ lld/trunk/lib/ReaderWriter/PECOFF/EdataPass.h Mon Jan  6 16:31:01
> 2014
> > @@ -36,9 +36,10 @@ namespace pecoff {
> > namespace edata {
> >
> > struct TableEntry {
> > -  TableEntry(StringRef exportName, int ordinal, const DefinedAtom *atom,
> > -             bool noname)
> > -      : exportName(exportName), ordinal(ordinal), atom(atom),
> noname(noname) {}
> > +  TableEntry(StringRef _exportName, int _ordinal, const DefinedAtom
> *_atom,
> > +             bool _noname)
> > +      : exportName(_exportName), ordinal(_ordinal), atom(_atom),
> > +        noname(_noname) {}
> >   StringRef exportName;
> >   int ordinal;
> >   const DefinedAtom *atom;
>
> Thanks for fixing the warning, but please use different names for the
> parameters.  The leading underscore makes them look like instance
> variables.  The exact opposite of what is going on.
>
> -Nick
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140106/2193b027/attachment.html>


More information about the llvm-commits mailing list