[clang-tidy] readability-named-parameter shouldn't comment out parameter names in function declaration #123646
Open
Description
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:
git clone https://github.com/LegalizeAdulthood/iterated-dynamics.git
git checkout 784b6062108a0d56d2e84313e975a5b04981d62f
git submodule init
git submodule update
- Configure with cmake, e.g.
cmake --preset default
- Run readability-named-parameter on
loadfile.cpp
, line 175