@@ -58,7 +58,7 @@ Improvements to Clang's diagnostics
58
58
access to determine if two operand expressions are the same.
59
59
- -Wtautological-bitwise-compare is a new warning group. This group has the
60
60
current warning which diagnoses the tautological comparison of a bitwise
61
- operation and a constant. The group also has the new warning which diagnoses
61
+ operation and a constant. The group also has the new warning which diagnoses
62
62
when a bitwise-or with a non-negative value is converted to a bool, since
63
63
that bool will always be true.
64
64
- -Wbitwise-conditional-parentheses will warn on operator precedence issues
@@ -138,9 +138,6 @@ Windows Support
138
138
139
139
error LNK2005: "bool const std::_Is_integral<int>" (??$_Is_integral@H@std@@3_NB) already defined
140
140
141
-
142
-
143
-
144
141
C Language Changes in Clang
145
142
---------------------------
146
143
@@ -296,13 +293,16 @@ clang-format
296
293
- ``Auto `` is the default and detects style from the code (this is unchanged).
297
294
298
295
The previous values of ``Cpp03 `` and ``Cpp11 `` are deprecated. Note that
299
- ``Cpp11 `` is treated as ``Latest ``, as this was always clang-format's behavior.
300
- (One motivation for this change is the new name describes the behavior better).
296
+ ``Cpp11 `` is treated as ``Latest ``, as this was always clang-format's
297
+ behavior. (One motivation for this change is the new name describes the
298
+ behavior better).
301
299
302
- - clang-format gets a new option called ``--dry-run `` or ``-n `` to emit a
303
- warning.
300
+ - Clang-format has a new option called ``--dry-run `` or ``-n `` to emit a
301
+ warning for clang-format violations. This can be used together
302
+ with --ferror-limit=N to limit the number of warnings per file and --Werror
303
+ to make warnings into errors.
304
304
305
- - Option *IncludeIsMainSourceRegex * added to allow for additional
305
+ - Option *IncludeIsMainSourceRegex * has been added to allow for additional
306
306
suffixes and file extensions to be considered as a source file
307
307
for execution of logic that looks for "main *include * file" to put
308
308
it on top.
@@ -311,7 +311,7 @@ clang-format
311
311
they end with: ``.c ``, ``.cc ``, ``.cpp ``, ``.c++ ``, ``.cxx ``,
312
312
``.m `` or ``.mm `` extensions. This config option allows to
313
313
extend this set of source files considered as "main".
314
-
314
+
315
315
For example, if this option is configured to ``(Impl\.hpp)$ ``,
316
316
then a file ``ClassImpl.hpp `` is considered "main" (in addition to
317
317
``Class.c ``, ``Class.cc ``, ``Class.cpp `` and so on) and "main
@@ -320,12 +320,31 @@ clang-format
320
320
``ClassImpl.hpp `` would not have the main include file put on top
321
321
before any other include.
322
322
323
+ - Options ``DeriveLineEnding `` and ``UseCRLF `` have been added to allow
324
+ clang-format to control the newlines. ``DeriveLineEnding `` is by default
325
+ ``true `` and reflects is the existing mechanism, which based is on majority
326
+ rule. The new options allows this to be turned off and ``UseCRLF `` to control
327
+ the decision as to which sort of line ending to use.
328
+
329
+ - Option ``SpaceBeforeSquareBrackets `` has been added to insert a space before
330
+ array declarations.
331
+
332
+ .. code-block :: c++
333
+
334
+ int a [5]; vs int a[5];
335
+
336
+ - Clang-format now supports JavaScript null operators.
337
+
338
+ .. code-block :: c++
339
+
340
+ const x = foo ?? default;
341
+ const z = foo?.bar?.baz;
342
+
323
343
libclang
324
344
--------
325
345
326
346
- ...
327
347
328
-
329
348
Static Analyzer
330
349
---------------
331
350
@@ -373,7 +392,6 @@ Undefined Behavior Sanitizer (UBSan)
373
392
return getelementpointer_inbounds(base, offset);
374
393
}
375
394
376
-
377
395
Core Analysis Improvements
378
396
==========================
379
397
0 commit comments