No functional changes intended as we should already do the
corresponding fixes when visiting the primary template. There are
existing tests that verify that we do change unused parameters of
templated functions.
llvm-svn: 259640
void UnusedParametersCheck::check(const MatchFinder::MatchResult &Result) {
const auto *Function = Result.Nodes.getNodeAs<FunctionDecl>("function");
if (!Function->doesThisDeclarationHaveABody() ||
- !Function->hasWrittenPrototype())
+ !Function->hasWrittenPrototype() ||
+ Function->isTemplateInstantiation())
return;
if (const auto *Method = dyn_cast<CXXMethodDecl>(Function))
if (Method->isLambdaStaticInvoker())