| Issue |
52848
|
| Summary |
clang-tidy does not update call sites when removing templated-function parameter (misc-unused-parameters)
|
| Labels |
clang-tidy
|
| Assignees |
|
| Reporter |
joker-eph
|
```
class GenericOp{};
template <typename GenericOpType>
static bool verifyGenericOp(GenericOpType op) {
return true;
}
static bool verify(GenericOp op) { return verifyGenericOp(op); }
```
When going through clang-tidy: `$ clang-tidy --checks=misc-unused-parameters bug.cpp -fix` ; it warns about:
```
/tmp/bugprone.cpp:4:43: warning: parameter 'op' is unused [misc-unused-parameters]
static bool verifyGenericOp(GenericOpType op) {
~~~~~~~~~~~~~~^~
```
And the fixit removes the parameter but leaves the call-site untouched:
```
class GenericOp{};
template <typename GenericOpType>
static bool verifyGenericOp() {
return true;
}
static bool verify(GenericOp op) { return verifyGenericOp(op); }
```
**If `verifyGenericOp` is not a template, the call site is properly updated**
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs