Issue 123646
Summary [clang-tidy] readability-named-parameter shouldn't comment out parameter names in function declaration
Labels enhancement, clang-tidy
Assignees
Reporter LegalizeAdulthood
    Suppose you have the following declaration:

```
static void transform(DblCoords *);

```
when readability-named-parameter is run, the code becomes:
```
static void transform(DblCoords * /*point*/);
```
Since this is a declaration, not a definition, the parameter name should not be commented out.

To reproduce:
1. `git clone https://github.com/LegalizeAdulthood/iterated-dynamics.git`
2. `git checkout 784b6062108a0d56d2e84313e975a5b04981d62f`
3. Configure with cmake, e.g. `cmake --preset default`
4. Run readability-named-parameter on `loadfile.cpp`, line 175

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to