[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 3 11:20:19 PST 2024


================
@@ -0,0 +1,24 @@
+.. title:: clang-tidy - readability-use-span-first-last
+
+readability-use-span-first-last
+===============================
+
+Suggests using ``std::span::first()`` and ``std::span::last()`` member functions 
+instead of equivalent ``subspan()``. These dedicated methods were added to C++20 
+to provide more expressive alternatives to common subspan operations.
+
+Covered scenarios:
+
+=============================== ============
----------------
EugeneZelenko wrote:

Please reduce first column on 4 characters and add two characters to second column, so all cell content will be covered.

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


More information about the cfe-commits mailing list