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&id=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