]> granicus.if.org Git - clang/commitdiff
[docs] document -Weveything more betterer
authorJF Bastien <jfbastien@apple.com>
Mon, 5 Aug 2019 16:53:45 +0000 (16:53 +0000)
committerJF Bastien <jfbastien@apple.com>
Mon, 5 Aug 2019 16:53:45 +0000 (16:53 +0000)
Reviewers: aaron.ballman

Subscribers: jkorous, dexonsmith, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D65706

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@367889 91177308-0d34-0410-b5e6-96231b3b80d8

docs/UsersManual.rst

index b5f7090603abd0a2768a6dda707c67e68f4b5dd5..24da54918526deb00cf42f47d7f13226172d7d07 100644 (file)
@@ -992,13 +992,24 @@ is treated as a system header.
 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
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^