Skip to content

Commit df22ff1

Browse files
committedAug 5, 2019
[docs] document -Weveything more betterer
Reviewers: aaron.ballman Subscribers: jkorous, dexonsmith, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65706 llvm-svn: 367889
1 parent bb7ad98 commit df22ff1

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed
 

‎clang/docs/UsersManual.rst

+18-7
Original file line numberDiff line numberDiff line change
@@ -992,13 +992,24 @@ is treated as a system header.
992992
Enabling All Diagnostics
993993
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
994994

995-
In addition to the traditional ``-W`` flags, one can enable **all**
996-
diagnostics by passing :option:`-Weverything`. This works as expected
997-
with
998-
:option:`-Werror`, and also includes the warnings from :option:`-pedantic`.
999-
1000-
Note that when combined with :option:`-w` (which disables all warnings), that
1001-
flag wins.
995+
In addition to the traditional ``-W`` flags, one can enable **all** diagnostics
996+
by passing :option:`-Weverything`. This works as expected with
997+
:option:`-Werror`, and also includes the warnings from :option:`-pedantic`. Some
998+
diagnostics contradict each other, therefore, users of :option:`-Weverything`
999+
often disable many diagnostics such as :option:`-Wno-c++98-compat`
1000+
:option:`-Wno-c++-compat` because they contradict recent C++ standards.
1001+
1002+
Since :option:`-Weverything` enables every diagnostic, we generally don't
1003+
recommend using it. :option:`-Wall` :option:`-Wextra` are a better choice for
1004+
most projects. Using :option:`-Weverything` means that updating your compiler is
1005+
more difficult because you're exposed to experimental diagnostics which might be
1006+
of lower quality than the default ones. If you do use :option:`-Weverything`
1007+
then we advise that you address all new compiler diagnostics as they get added
1008+
to Clang, either by fixing everything they find or explicitly disabling that
1009+
diagnostic with its corresponding `Wno-` option.
1010+
1011+
Note that when combined with :option:`-w` (which disables all warnings),
1012+
disabling all warnings wins.
10021013

10031014
Controlling Static Analyzer Diagnostics
10041015
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)
Please sign in to comment.