Shadowing of members

Walter Bright newshound2 at digitalmars.com
Thu Jan 10 11:46:13 PST 2013


On 1/10/2013 2:18 AM, Benjamin Thaut wrote:
> But there are no such tools yet for D.
> Couldn't we add a -analyze flag to the compiler which will do such checks? Other
> compilers like the microsoft c++ compiler provide such a flag too.


The history of such flags is miserable.

Any diagnostic that gives false positives should not be in the compiler.

For example, I've run PVS-Studio over the dmd source. It produces a freakin' 
blizzard of false positives, where the workaround is very ugly. So, one ignores 
the false positives.

It's not so easy to ignore it if it is in the compiler and your company coding 
standards require passage with no warning messages.


More information about the Digitalmars-d mailing list