[clang-tools-extra] [clang-tidy][modernize-return-braced-init-list]fix false-positives (PR #68491)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 7 10:21:03 PDT 2023


================
@@ -269,6 +269,12 @@ Changes in existing checks
   <clang-tidy/checks/modernize/loop-convert>` to support for-loops with
   iterators initialized by free functions like ``begin``, ``end``, or ``size``.
 
+- Improved :doc:`modernize-return-braced-init-list
+  <clang-tidy/checks/modernize/return-braced-init-list>` check to ignore
+  false-positives when constructing the container with ``count`` copies of
+  elements with value ``value``
+  (e.g., ``vector(size_type count, const T& value);``).
----------------
PiotrZSL wrote:

no need to put example here. just end at value.

https://github.com/llvm/llvm-project/pull/68491


More information about the cfe-commits mailing list