[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)
Julian Schmidt via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 13 10:04:47 PDT 2024
================
@@ -111,6 +111,10 @@ Changes in existing checks
<clang-tidy/checks/bugprone/casting-through-void>` check to suggest replacing
the offending code with ``reinterpret_cast``, to more clearly express intent.
+- Improved :doc:`modernize-avoid-c-arrays
+ <clang-tidy/checks/modernize/avoid-c-arrays>` check to suggest use std::span
+ as replacement of c array in C++20.
----------------
5chmidti wrote:
Please escape `std::span`, and capitalize `C array`. You have also changed the behavior for pre C++20 code as well by changing the suggestion to `std::vector`
https://github.com/llvm/llvm-project/pull/108555
More information about the cfe-commits
mailing list