[PATCH] D65706: [docs] document -Weveything more betterer
JF Bastien via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 3 15:26:46 PDT 2019
jfb created this revision.
jfb added a reviewer: aaron.ballman.
Herald added subscribers: cfe-commits, dexonsmith, jkorous.
Herald added a project: clang.
Repository:
rG LLVM Github Monorepo
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, users :option:`-Weverything` therefore often
+disable many diagnostics such as :option:`-Wno-c++98-compat`
+:option:`-Wno-c++-compat`.
+
+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 once. 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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65706.213210.patch
Type: text/x-patch
Size: 1759 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190803/b8b54177/attachment.bin>
More information about the cfe-commits
mailing list