[clang-tools-extra] [clang-tidy] Add modernize-pointer-to-span check (PR #182085)

via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 20 10:53:30 PST 2026


================
@@ -121,6 +121,12 @@ New checks
   ``llvm::to_vector(llvm::make_filter_range(...))`` that can be replaced with
   ``llvm::map_to_vector`` and ``llvm::filter_to_vector``.
 
+- New :doc:`modernize-pointer-to-span
+  <clang-tidy/checks/modernize/pointer-to-span>` check.
+
+  Finds function parameter pairs of (pointer, size) that could be
+  replaced with ``std::span``.
----------------
EugeneZelenko wrote:

```suggestion
  Finds function parameter pairs of (pointer, size) that could be replaced with
  ``std::span``.
```

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


More information about the cfe-commits mailing list