[clang-tools-extra] [clang-tidy] Avoid non-const-parameter fix-it conflicts with overloads (PR #202490)
Zeyi Xu via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 9 00:08:59 PDT 2026
zeyi2 wrote:
Hi, thanks for the feedback.
> Does it work with the following snippet as well?
>
> ```c++
> double f(/*const*/ double * x) { return *x; }
> double f( const double *const x) { return *x; }
>
> void g(double x[2], double /*const*/ y[2]) { x[0] = y[0]; }
> void g(double x[2], double const y[2]) { x[0] = y[0]; }
> ```
These cases would work with this fix, I've added more tests in the regression test.
(Though I suspect there could be some FN with templates.. maybe out of scope of this PR)
https://github.com/llvm/llvm-project/pull/202490
More information about the cfe-commits
mailing list