[llvm-branch-commits] [clang] aef96a6 - add a few new warnings to the 10.0 clang release notes

Nico Weber via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Mar 13 06:25:06 PDT 2020


Author: Nico Weber
Date: 2020-03-13T09:24:54-04:00
New Revision: aef96a6860c76f8d922999619c4bb590d3cb2e8a

URL: https://github.com/llvm/llvm-project/commit/aef96a6860c76f8d922999619c4bb590d3cb2e8a
DIFF: https://github.com/llvm/llvm-project/commit/aef96a6860c76f8d922999619c4bb590d3cb2e8a.diff

LOG: add a few new warnings to the 10.0 clang release notes

Added: 
    

Modified: 
    clang/docs/ReleaseNotes.rst

Removed: 
    


################################################################################
diff  --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 952e1d3483f0..5d2314b601b8 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -78,6 +78,28 @@ Improvements to Clang's diagnostics
 
 - ``-Wbitwise-op-parentheses`` and ``-Wlogical-op-parentheses`` are disabled by default.
 
+- The new warnings ``Wc99-designator`` and ``-Wreorder-init-list`` warn about
+  uses of C99 initializers in C++ mode for cases that are valid in C99 but not
+  in C++20.
+
+- The new warning ``-Wsizeof-array-div`` catches cases like
+  ``int arr[10]; ...sizeof(arr) / sizeof(short)...``
+  (should be ``sizeof(arr) / sizeof(int)``), and the existing warning
+  ``-Wsizeof-pointer-div`` catches more cases.
+
+- The new warning ``-Wxor-used-as-pow`` warns on cases where it looks like
+  the xor operator ``^`` is used to be mean exponentiation, e.g. ``2 ^ 16``.
+
+- The new warning ``-Wfinal-dtor-non-final-class`` warns on classes that
+  have a final destructor but aren't themselves marked final.
+
+- ``-Wextra`` now enables ``-Wdeprecated-copy``. The warning deprecates
+  move and copy constructors in classes where an explicit destructor is
+  declared. This is for compatibility with GCC 9, and forward looking
+  for a change that's being considered for C++23. You can disable it with
+  ``-Wno-deprecated-copy``.
+
+
 Non-comprehensive list of changes in this release
 -------------------------------------------------
 


        


More information about the llvm-branch-commits mailing list