[PATCH] D65706: [docs] Better documentation for -Weverything

2019-08-05 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment.

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65706/new/

https://reviews.llvm.org/D65706



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D65706: [docs] Better documentation for -Weverything

2019-08-05 Thread JF Bastien via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL367889: [docs] document -Weveything more betterer (authored 
by jfb, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D65706?vs=213278=213390#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65706/new/

https://reviews.llvm.org/D65706

Files:
  cfe/trunk/docs/UsersManual.rst


Index: cfe/trunk/docs/UsersManual.rst
===
--- cfe/trunk/docs/UsersManual.rst
+++ cfe/trunk/docs/UsersManual.rst
@@ -992,13 +992,24 @@
 Enabling All Diagnostics
 ^
 
-In addition to the traditional ``-W`` flags, one can enable **all**
-diagnostics by passing :option:`-Weverything`. This works as expected
-with
-:option:`-Werror`, and also includes the warnings from :option:`-pedantic`.
+In addition to the traditional ``-W`` flags, one can enable **all** diagnostics
+by passing :option:`-Weverything`. This works as expected with
+:option:`-Werror`, and also includes the warnings from :option:`-pedantic`. 
Some
+diagnostics contradict each other, therefore, users of :option:`-Weverything`
+often disable many diagnostics such as :option:`-Wno-c++98-compat`
+:option:`-Wno-c++-compat` because they contradict recent C++ standards.
+
+Since :option:`-Weverything` enables every diagnostic, we generally don't
+recommend using it. :option:`-Wall` :option:`-Wextra` are a better choice for
+most projects. Using :option:`-Weverything` means that updating your compiler 
is
+more difficult because you're exposed to experimental diagnostics which might 
be
+of lower quality than the default ones. If you do use :option:`-Weverything`
+then we advise that you address all new compiler diagnostics as they get added
+to Clang, either by fixing everything they find or explicitly disabling that
+diagnostic with its corresponding `Wno-` option.
 
-Note that when combined with :option:`-w` (which disables all warnings), that
-flag wins.
+Note that when combined with :option:`-w` (which disables all warnings),
+disabling all warnings wins.
 
 Controlling Static Analyzer Diagnostics
 ^^^


Index: cfe/trunk/docs/UsersManual.rst
===
--- cfe/trunk/docs/UsersManual.rst
+++ cfe/trunk/docs/UsersManual.rst
@@ -992,13 +992,24 @@
 Enabling All Diagnostics
 ^
 
-In addition to the traditional ``-W`` flags, one can enable **all**
-diagnostics by passing :option:`-Weverything`. This works as expected
-with
-:option:`-Werror`, and also includes the warnings from :option:`-pedantic`.
+In addition to the traditional ``-W`` flags, one can enable **all** diagnostics
+by passing :option:`-Weverything`. This works as expected with
+:option:`-Werror`, and also includes the warnings from :option:`-pedantic`. Some
+diagnostics contradict each other, therefore, users of :option:`-Weverything`
+often disable many diagnostics such as :option:`-Wno-c++98-compat`
+:option:`-Wno-c++-compat` because they contradict recent C++ standards.
+
+Since :option:`-Weverything` enables every diagnostic, we generally don't
+recommend using it. :option:`-Wall` :option:`-Wextra` are a better choice for
+most projects. Using :option:`-Weverything` means that updating your compiler is
+more difficult because you're exposed to experimental diagnostics which might be
+of lower quality than the default ones. If you do use :option:`-Weverything`
+then we advise that you address all new compiler diagnostics as they get added
+to Clang, either by fixing everything they find or explicitly disabling that
+diagnostic with its corresponding `Wno-` option.
 
-Note that when combined with :option:`-w` (which disables all warnings), that
-flag wins.
+Note that when combined with :option:`-w` (which disables all warnings),
+disabling all warnings wins.
 
 Controlling Static Analyzer Diagnostics
 ^^^
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D65706: [docs] Better documentation for -Weverything

2019-08-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM!




Comment at: clang/docs/UsersManual.rst:999-1000
+diagnostics contradict each other, users of :option:`-Weverything` therefore
+often disable many diagnostics such as :option:`-Wno-c++98-compat`
+:option:`-Wno-c++-compat`.
+

jfb wrote:
> aaron.ballman wrote:
> > jfb wrote:
> > > aaron.ballman wrote:
> > > > Would you care to propose a more exhaustive list of conflicting 
> > > > diagnostics? (Perhaps in a follow-up patch.)
> > > I looked a bit and I'm worried that providing a list won't be 
> > > particularly satisfying for people looking at this. I think it's better 
> > > to have some warning, and let folks figure out what works for their 
> > > particular situation. Here I'm assuming that they don't use C++98 and 
> > > that seems reasonable, but figuring out what side of contradictions 
> > > they're on doesn't seem like it'll work out.
> > One of the primary concerns with enabling `-Weverything` is the fact that 
> > we know this enables conflicting diagnostics. Telling the user "we know 
> > there are conflicting diagnostics, but we want you to have the joy of 
> > figuring out which ones conflict for yourself" seems even more 
> > unsatisfying, to me. I agree that we don't want to tell users which of the 
> > conflicting options they should disable, but was thinking of something more 
> > along the lines of:
> > ```
> > The following sets of options are known to have some possibly unfortunate 
> > interactions when enabled together:
> >   * -Wfoo, -Wbar
> >   * -Wbaz, -Wquux
> >   * ...
> > Note that there may be other conflicting diagnostic flags not listed above.
> > ```
> > I figure that gives users a bit more of an idea of what they're signing up 
> > for when they enable -Weverything, which seems useful.
> OK I can do that as a follow-up.
Awesome, thank you!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65706/new/

https://reviews.llvm.org/D65706



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D65706: [docs] Better documentation for -Weverything

2019-08-05 Thread JF Bastien via Phabricator via cfe-commits
jfb marked an inline comment as done.
jfb added inline comments.



Comment at: clang/docs/UsersManual.rst:999-1000
+diagnostics contradict each other, users of :option:`-Weverything` therefore
+often disable many diagnostics such as :option:`-Wno-c++98-compat`
+:option:`-Wno-c++-compat`.
+

aaron.ballman wrote:
> jfb wrote:
> > aaron.ballman wrote:
> > > Would you care to propose a more exhaustive list of conflicting 
> > > diagnostics? (Perhaps in a follow-up patch.)
> > I looked a bit and I'm worried that providing a list won't be particularly 
> > satisfying for people looking at this. I think it's better to have some 
> > warning, and let folks figure out what works for their particular 
> > situation. Here I'm assuming that they don't use C++98 and that seems 
> > reasonable, but figuring out what side of contradictions they're on doesn't 
> > seem like it'll work out.
> One of the primary concerns with enabling `-Weverything` is the fact that we 
> know this enables conflicting diagnostics. Telling the user "we know there 
> are conflicting diagnostics, but we want you to have the joy of figuring out 
> which ones conflict for yourself" seems even more unsatisfying, to me. I 
> agree that we don't want to tell users which of the conflicting options they 
> should disable, but was thinking of something more along the lines of:
> ```
> The following sets of options are known to have some possibly unfortunate 
> interactions when enabled together:
>   * -Wfoo, -Wbar
>   * -Wbaz, -Wquux
>   * ...
> Note that there may be other conflicting diagnostic flags not listed above.
> ```
> I figure that gives users a bit more of an idea of what they're signing up 
> for when they enable -Weverything, which seems useful.
OK I can do that as a follow-up.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65706/new/

https://reviews.llvm.org/D65706



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D65706: [docs] Better documentation for -Weverything

2019-08-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments.



Comment at: clang/docs/UsersManual.rst:999-1000
+diagnostics contradict each other, users of :option:`-Weverything` therefore
+often disable many diagnostics such as :option:`-Wno-c++98-compat`
+:option:`-Wno-c++-compat`.
+

jfb wrote:
> aaron.ballman wrote:
> > Would you care to propose a more exhaustive list of conflicting 
> > diagnostics? (Perhaps in a follow-up patch.)
> I looked a bit and I'm worried that providing a list won't be particularly 
> satisfying for people looking at this. I think it's better to have some 
> warning, and let folks figure out what works for their particular situation. 
> Here I'm assuming that they don't use C++98 and that seems reasonable, but 
> figuring out what side of contradictions they're on doesn't seem like it'll 
> work out.
One of the primary concerns with enabling `-Weverything` is the fact that we 
know this enables conflicting diagnostics. Telling the user "we know there are 
conflicting diagnostics, but we want you to have the joy of figuring out which 
ones conflict for yourself" seems even more unsatisfying, to me. I agree that 
we don't want to tell users which of the conflicting options they should 
disable, but was thinking of something more along the lines of:
```
The following sets of options are known to have some possibly unfortunate 
interactions when enabled together:
  * -Wfoo, -Wbar
  * -Wbaz, -Wquux
  * ...
Note that there may be other conflicting diagnostic flags not listed above.
```
I figure that gives users a bit more of an idea of what they're signing up for 
when they enable -Weverything, which seems useful.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65706/new/

https://reviews.llvm.org/D65706



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D65706: [docs] Better documentation for -Weverything

2019-08-04 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 213278.
jfb marked 5 inline comments as done.
jfb added a comment.

- Address Aaron's comments.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65706/new/

https://reviews.llvm.org/D65706

Files:
  clang/docs/UsersManual.rst


Index: clang/docs/UsersManual.rst
===
--- clang/docs/UsersManual.rst
+++ clang/docs/UsersManual.rst
@@ -992,13 +992,24 @@
 Enabling All Diagnostics
 ^
 
-In addition to the traditional ``-W`` flags, one can enable **all**
-diagnostics by passing :option:`-Weverything`. This works as expected
-with
-:option:`-Werror`, and also includes the warnings from :option:`-pedantic`.
-
-Note that when combined with :option:`-w` (which disables all warnings), that
-flag wins.
+In addition to the traditional ``-W`` flags, one can enable **all** diagnostics
+by passing :option:`-Weverything`. This works as expected with
+:option:`-Werror`, and also includes the warnings from :option:`-pedantic`. 
Some
+diagnostics contradict each other, therefore, users of :option:`-Weverything`
+often disable many diagnostics such as :option:`-Wno-c++98-compat`
+:option:`-Wno-c++-compat` because they contradict recent C++ standards.
+
+Since :option:`-Weverything` enables every diagnostic, we generally don't
+recommend using it. :option:`-Wall` :option:`-Wextra` are a better choice for
+most projects. Using :option:`-Weverything` means that updating your compiler 
is
+more difficult because you're exposed to experimental diagnostics which might 
be
+of lower quality than the default ones. If you do use :option:`-Weverything`
+then we advise that you address all new compiler diagnostics as they get added
+to Clang, either by fixing everything they find or explicitly disabling that
+diagnostic with its corresponding `Wno-` option.
+
+Note that when combined with :option:`-w` (which disables all warnings),
+disabling all warnings wins.
 
 Controlling Static Analyzer Diagnostics
 ^^^


Index: clang/docs/UsersManual.rst
===
--- clang/docs/UsersManual.rst
+++ clang/docs/UsersManual.rst
@@ -992,13 +992,24 @@
 Enabling All Diagnostics
 ^
 
-In addition to the traditional ``-W`` flags, one can enable **all**
-diagnostics by passing :option:`-Weverything`. This works as expected
-with
-:option:`-Werror`, and also includes the warnings from :option:`-pedantic`.
-
-Note that when combined with :option:`-w` (which disables all warnings), that
-flag wins.
+In addition to the traditional ``-W`` flags, one can enable **all** diagnostics
+by passing :option:`-Weverything`. This works as expected with
+:option:`-Werror`, and also includes the warnings from :option:`-pedantic`. Some
+diagnostics contradict each other, therefore, users of :option:`-Weverything`
+often disable many diagnostics such as :option:`-Wno-c++98-compat`
+:option:`-Wno-c++-compat` because they contradict recent C++ standards.
+
+Since :option:`-Weverything` enables every diagnostic, we generally don't
+recommend using it. :option:`-Wall` :option:`-Wextra` are a better choice for
+most projects. Using :option:`-Weverything` means that updating your compiler is
+more difficult because you're exposed to experimental diagnostics which might be
+of lower quality than the default ones. If you do use :option:`-Weverything`
+then we advise that you address all new compiler diagnostics as they get added
+to Clang, either by fixing everything they find or explicitly disabling that
+diagnostic with its corresponding `Wno-` option.
+
+Note that when combined with :option:`-w` (which disables all warnings),
+disabling all warnings wins.
 
 Controlling Static Analyzer Diagnostics
 ^^^
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D65706: [docs] Better documentation for -Weverything

2019-08-04 Thread JF Bastien via Phabricator via cfe-commits
jfb added inline comments.



Comment at: clang/docs/UsersManual.rst:999-1000
+diagnostics contradict each other, users of :option:`-Weverything` therefore
+often disable many diagnostics such as :option:`-Wno-c++98-compat`
+:option:`-Wno-c++-compat`.
+

aaron.ballman wrote:
> Would you care to propose a more exhaustive list of conflicting diagnostics? 
> (Perhaps in a follow-up patch.)
I looked a bit and I'm worried that providing a list won't be particularly 
satisfying for people looking at this. I think it's better to have some 
warning, and let folks figure out what works for their particular situation. 
Here I'm assuming that they don't use C++98 and that seems reasonable, but 
figuring out what side of contradictions they're on doesn't seem like it'll 
work out.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65706/new/

https://reviews.llvm.org/D65706



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D65706: [docs] Better documentation for -Weverything

2019-08-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment.

Thank you for working on this!




Comment at: clang/docs/UsersManual.rst:998
+:option:`-Werror`, and also includes the warnings from :option:`-pedantic`. 
Some
+diagnostics contradict each other, users of :option:`-Weverything` therefore
+often disable many diagnostics such as :option:`-Wno-c++98-compat`

users of -Weverything therefore -> therefore, users of -Weverything



Comment at: clang/docs/UsersManual.rst:999-1000
+diagnostics contradict each other, users of :option:`-Weverything` therefore
+often disable many diagnostics such as :option:`-Wno-c++98-compat`
+:option:`-Wno-c++-compat`.
+

Would you care to propose a more exhaustive list of conflicting diagnostics? 
(Perhaps in a follow-up patch.)



Comment at: clang/docs/UsersManual.rst:1006
+more difficult because you're exposed to experimental diagnostics which might 
be
+of lower quality than the default once. If you do use :option:`-Weverything`
+then we advise that you address all new compiler diagnostics as they get added

once -> ones
Add a comma after -Weverything



Comment at: clang/docs/UsersManual.rst:1008
+then we advise that you address all new compiler diagnostics as they get added
+to clang, either by fixing everything they find or explicitly disabling that
+diagnostic with its corresponding `Wno-` option.

clang -> Clang


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65706/new/

https://reviews.llvm.org/D65706



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits