diff options
| author | JF Bastien <jfbastien@apple.com> | 2019-08-05 16:53:45 +0000 |
|---|---|---|
| committer | JF Bastien <jfbastien@apple.com> | 2019-08-05 16:53:45 +0000 |
| commit | df22ff103c3f999b4a534657946860de36d29404 (patch) | |
| tree | b769da6bef0cb3fa68ceb8b581a688ffa378b0a8 | |
| parent | bb7ad98a472e2e6b07d43df08bec687604a27d42 (diff) | |
| download | llvm-df22ff103c3f999b4a534657946860de36d29404.zip llvm-df22ff103c3f999b4a534657946860de36d29404.tar.gz llvm-df22ff103c3f999b4a534657946860de36d29404.tar.bz2 | |
[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
| -rw-r--r-- | clang/docs/UsersManual.rst | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst index b5f7090..24da549 100644 --- a/clang/docs/UsersManual.rst +++ b/clang/docs/UsersManual.rst @@ -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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
