<div dir="rtl"><div dir="ltr">If I understand these warning correctly (they are not documented on MS web site yet), they warn about local variable  shadowing some other definition. If so, none are good to suppress, to the contrary, these new warnings are likely to expose bugs in the current codebase.</div>

<div dir="ltr"><br></div><div dir="ltr">Shadow situations cause very confusing bugs. We have long functions in clang, for instance Sema::ClassifyName is about 300 lines. If I need to modify this function, I glance at its header and see Scope *S. I would expect S refer to the input paramater all along the function, rather being shadowed by some local variable. I can check with VS goto declaration what II refers to but why? I've seen it's an input parameter, right? name shadowing is a trap.</div>

<div dir="ltr"><br></div><div dir="ltr">Yaron</div><div dir="ltr"><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div dir="ltr">2014-08-01 15:28 GMT+03:00 Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span>:</div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> From bffa68240130a2cef732d24be259e9523266e67c Mon Sep 17 00:00:00 2001<br>
> From: Oliver Schneider <<a href="mailto:oliver.schneider@kit.edu">oliver.schneider@kit.edu</a>><br>
> Date: Fri, 1 Aug 2014 11:46:32 +0200<br>
> Subject: [PATCH] ignore new verbose warnings on MSVC 14<br>
><br>
> ---<br>
>  cmake/modules/HandleLLVMOptions.cmake | 3 +++<br>
>  1 file changed, 3 insertions(+)<br>
><br>
> diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake<br>
> index 8258512..2c6b56d 100644<br>
> --- a/cmake/modules/HandleLLVMOptions.cmake<br>
> +++ b/cmake/modules/HandleLLVMOptions.cmake<br>
> @@ -245,6 +245,9 @@ if( MSVC )<br>
>      -wd4345 # Suppress 'behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized'<br>
>      -wd4351 # Suppress 'new behavior: elements of array 'array' will be default initialized'<br>
>      -wd4355 # Suppress ''this' : used in base member initializer list'<br>
> +    -wd4456 # Suppress 'declaration of 'variable_name' hides previous local declaration'<br>
> +    -wd4457 # Suppress 'declaration of 'variable_name' hides function parameter'<br>
<br>
These make sense to suppress, I think.<br>
<br>
> +    -wd4458 # Suppress 'declaration of 'variable_name' hides class member'<br>
<br>
This one has me slightly worried. How often does this warning happen<br>
in practice?<br>
<br>
>      -wd4503 # Suppress ''identifier' : decorated name length exceeded, name was truncated'<br>
>      -wd4624 # Suppress ''derived class' : destructor could not be generated because a base class destructor is inaccessible'<br>
>      -wd4722 # Suppress 'function' : destructor never returns, potential memory leak<br>
> --<br>
> 1.8.5.2.msysgit.0<br>
><br>
<br>
Thanks!<br>
<br>
~Aaron<br>
<br>
On Fri, Aug 1, 2014 at 6:48 AM, oliver <<a href="mailto:llvm6549@oli-obk.de">llvm6549@oli-obk.de</a>> wrote:<br>
> Sorry, new attachment, i just noticed there's one more relevant message + i<br>
> didn't add it in the correct order as the other warnings were<br>
><br>
> Am 01.08.2014 12:37, schrieb oliver:<br>
><br>
> Hi,<br>
><br>
> attached is a small patch that adds 2 more warnings to the MSVC warning<br>
> ignore list<br>
><br>
> greetings<br>
><br>
> /oliver<br>
><br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
><br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>