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

Nick Kledzik kledzik at apple.com
Mon Jan 6 14:40:57 PST 2014


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





More information about the llvm-commits mailing list