msvc 14 generates new warnings that occurr in just about every llvm source file

Yaron Keren yaron.keren at gmail.com
Fri Aug 1 07:36:02 PDT 2014


Hi Aaron,

There are going to be false positives with the local shadowing (compared
with real bugs).
I don't know about the parameter and memeber ones. We could look into few
of these warnings to get the "feel".

Oliver - could you copy and paste the list of wd4457 and wd4458 from the VS
2014 build window ?

Yaron



2014-08-01 17:14 GMT+03:00 Aaron Ballman <aaron at aaronballman.com>:

> On Fri, Aug 1, 2014 at 10:01 AM, Yaron Keren <yaron.keren at gmail.com>
> wrote:
> > 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.
> >
> > 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.
>
> Shadowing is generally a trap, but the local and parameter warnings
> are going to have a *lot* of false positives due to our naming
> conventions. This is especially true for things like loop counters,
> etc. I would rather not turn on that chatty of a diagnostic until
> we've sanitized the codebase further.
>
> ~Aaron
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140801/83bfb319/attachment.html>


More information about the llvm-commits mailing list