[clang] 8b5f6c1 - [clang-format] [NFC] add recent changes to release notes

via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 19 00:44:39 PST 2019


Author: mydeveloperday
Date: 2019-11-19T08:44:27Z
New Revision: 8b5f6c16476c7a8f50b660fb6e1b549759a783b6

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

LOG: [clang-format] [NFC] add recent changes to release notes

Summary: clang-tidy keeps nice release notes of what is added, have clang-format do the same.

Reviewers: klimek, mitchell-stellar, sylvestre.ledru, sammccall

Reviewed By: mitchell-stellar

Subscribers: merge_guards_bot, Eugene.Zelenko, cfe-commits

Tags: #clang-format, #clang

Differential Revision: https://reviews.llvm.org/D70355

Added: 
    

Modified: 
    clang/docs/ReleaseNotes.rst

Removed: 
    


################################################################################
diff  --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 5c8f3bd13d5a..4ac300deb589 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -58,7 +58,7 @@ Improvements to Clang's diagnostics
   access to determine if two operand expressions are the same.
 - -Wtautological-bitwise-compare is a new warning group.  This group has the
   current warning which diagnoses the tautological comparison of a bitwise
-  operation and a constant.  The group also has the new warning which diagnoses
+  operation and a constant. The group also has the new warning which diagnoses
   when a bitwise-or with a non-negative value is converted to a bool, since
   that bool will always be true.
 - -Wbitwise-conditional-parentheses will warn on operator precedence issues
@@ -138,9 +138,6 @@ Windows Support
 
     error LNK2005: "bool const std::_Is_integral<int>" (??$_Is_integral at H@std@@3_NB) already defined
 
-
-
-
 C Language Changes in Clang
 ---------------------------
 
@@ -296,13 +293,16 @@ clang-format
   - ``Auto`` is the default and detects style from the code (this is unchanged).
 
   The previous values of ``Cpp03`` and ``Cpp11`` are deprecated. Note that
-  ``Cpp11`` is treated as ``Latest``, as this was always clang-format's behavior.
-  (One motivation for this change is the new name describes the behavior better).
+  ``Cpp11`` is treated as ``Latest``, as this was always clang-format's
+  behavior. (One motivation for this change is the new name describes the
+  behavior better).
 
-- clang-format gets a new option called ``--dry-run`` or ``-n`` to emit a
-  warning.
+- Clang-format has a new option called ``--dry-run`` or ``-n`` to emit a
+  warning for clang-format violations. This can be used together
+  with --ferror-limit=N to limit the number of warnings per file and --Werror
+  to make warnings into errors.
 
-- Option *IncludeIsMainSourceRegex* added to allow for additional
+- Option *IncludeIsMainSourceRegex* has been added to allow for additional
   suffixes and file extensions to be considered as a source file
   for execution of logic that looks for "main *include* file" to put
   it on top.
@@ -311,7 +311,7 @@ clang-format
   they end with: ``.c``, ``.cc``, ``.cpp``, ``.c++``, ``.cxx``,
   ``.m`` or ``.mm`` extensions. This config option allows to
   extend this set of source files considered as "main".
-            
+
   For example, if this option is configured to ``(Impl\.hpp)$``,
   then a file ``ClassImpl.hpp`` is considered "main" (in addition to
   ``Class.c``, ``Class.cc``, ``Class.cpp`` and so on) and "main
@@ -320,12 +320,31 @@ clang-format
   ``ClassImpl.hpp`` would not have the main include file put on top
   before any other include.
 
+- Options ``DeriveLineEnding`` and  ``UseCRLF`` have been added to allow
+  clang-format to control the newlines. ``DeriveLineEnding`` is by default
+  ``true`` and reflects is the existing mechanism, which based is on majority
+  rule. The new options allows this to be turned off and ``UseCRLF`` to control
+  the decision as to which sort of line ending to use.
+
+- Option ``SpaceBeforeSquareBrackets`` has been added to insert a space before
+  array declarations.
+
+  .. code-block:: c++
+
+    int a [5];    vs    int a[5];
+
+- Clang-format now supports JavaScript null operators.
+
+  .. code-block:: c++
+
+    const x = foo ?? default;
+    const z = foo?.bar?.baz;
+
 libclang
 --------
 
 - ...
 
-
 Static Analyzer
 ---------------
 
@@ -373,7 +392,6 @@ Undefined Behavior Sanitizer (UBSan)
         return getelementpointer_inbounds(base, offset);
       }
 
-
 Core Analysis Improvements
 ==========================
 


        


More information about the cfe-commits mailing list