================
@@ -10,29 +10,32 @@ modernize-avoid-c-arrays
Finds C-style array types and recommend to use ``std::array<>`` /
``std::vector<>``. All types of C arrays are diagnosed.
+For parameters of incomplete C-style array type, it would be better to
+use ``std::span`` / ``gsl::span`` as replacement.
+
However, fix-it are potentially dangerous in header files and are therefore not
emitted right now.
.. code:: c++
- int a[] = {1, 2}; // warning: do not declare C-style arrays, use
std::array<> instead
+ int a[] = {1, 2}; // warning: do not declare C-style arrays, use
'std::array<>' instead
----------------
carlosgalvezp wrote:
Nit: is adding the single quotes needed for this patch? It introduces quite
some review noise. It'd be preferable to apply this as a separate (NFC?) patch.
https://github.com/llvm/llvm-project/pull/108555
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits