@@ -992,13 +992,24 @@ is treated as a system header.
992
992
Enabling All Diagnostics
993
993
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
994
994
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.
1002
1013
1003
1014
Controlling Static Analyzer Diagnostics
1004
1015
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0 commit comments