<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Jul 25, 2017 at 1:19 AM Roman Lebedev via Phabricator via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">lebedev.ri added a comment.<br>
<br>
How does this relate to the gcc behavior?<br>
I suspect not everyone would want to have this relaxed `-Wshadow` mode.<br></blockquote><div><br>Generally I think the goal hasn't been to allow a clang user to keep their code GCC warning clean - if a warning has too many false positives, it can/will be changed in clang, even if it means it misses cases GCC will flag. (for example -Wreturn-type, which pops up a lot in the LLVM codebase when it fires on code that's probably unreachable that Clang is nice enough to assume won't be reached (code after a fully covered switch over enum, where each case returns))<br><br>Though it's not unheard of to bisect the diagnostic space to provide these variations if suitable - but I wouldn't suggest doing so 'just' for compatibility with GCC.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Perhaps it could be hidden under some new flag, which is not going to be automatically enabled by `-Weverything`.<br></blockquote><div><br>Nothing is ever not going to be automatically enabled by -Weverything (the intent is that it's really, always, everything). Or perhaps you meant -Wall? (which isn't everything & that ship's already sailed, so usually more nuanced choices are made about what goes in there, etc)<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Like, `-Wshadow-in-macros` which does nothing compared to `-Wshadow`, and then `-Wno-shadow-in-macros` which enables this relaxed mode?<br>
<br>
<br>
<a href="https://reviews.llvm.org/D35783" rel="noreferrer" target="_blank">https://reviews.llvm.org/D35783</a><br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div></div>