Issue 144475
Summary [clang-tidy] modernize-loop-convert for pointer and size
Labels
Assignees
Reporter lcsondes
    When working with a C API, I often receive arrays as a separate pointer and size. I'd like this pattern to be supported by modernize-loop-convert:

```c++
void foo(int* array, int size)
{
 for(int i = 0; i < size; i++)
        std::cout << array[i];
}
```
To become something like this:
```c++
void foo(int* array, int size)
{
 for(int i : std::span(array, size))
        std::cout << i;
}
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to