Also see: llvm.org/PR24180.
Details
Diff Detail
Event Timeline
Feel free to address the comments below in a follow-up patch. This seems a fine next step, LGTM
| clang-tidy/misc/UnusedParametersCheck.cpp | ||
|---|---|---|
| 76 | Hmm, I thought of a reason to not delete parameters from local functions -- if they're used in some way other than calling them such as using them as an argument to a template. Maybe check for non-CallExpr DeclRefExprs of the function, and fall back to the commenting strategy? | |
| test/clang-tidy/misc-unused-parameters.cpp | ||
| 23–24 | Does this already handle function in anonymous namespaces? Want to add those as a follow-up? The next obvious chunk is to handle non-virtual methods of classes in anonymous namespaces. Perhaps those will be handled automatically though. | |
Hmm, I thought of a reason to not delete parameters from local functions -- if they're used in some way other than calling them such as using them as an argument to a template.
Maybe check for non-CallExpr DeclRefExprs of the function, and fall back to the commenting strategy?