| Issue |
108053
|
| Summary |
[clang-tidy] False positive modernize-avoid-c-arrays for function parameters
|
| Labels |
clang-tidy
|
| Assignees |
|
| Reporter |
chrchr-github
|
~~~c++
#include <iostream>
void f(const char a[]) {
std::cout << a;
}
void g(const char* p) {
f("abc");
f(p);
}
~~~
~~~
<source>:3:14: warning: do not declare C-style arrays, use std::array<> instead [modernize-avoid-c-arrays]
3 | void f(const char a[]) {
| ^
~~~
Clearly `std::array` cannot be used here.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs