[clang-tidy] Ignore implicit functions in performance-unnecessary-value-param
Summary:
The performance-unnecessary-value-param check mangled inherited
constructors, as the constructors' parameters do not have useful source
locations. Fix this by ignoring implicit functions.
Fixes PR31684.
Reviewers: flx, alexfh, aaron.ballman
Subscribers: madsravn, JDevlieghere, cfe-commits
Differential Revision: https://reviews.llvm.org/D29018
llvm-svn: 292786
diff --git a/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp b/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp
index 4c12318..cde30a6 100644
--- a/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp
+++ b/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp
@@ -74,7 +74,7 @@
Finder->addMatcher(
functionDecl(hasBody(stmt()), isDefinition(),
unless(cxxMethodDecl(anyOf(isOverride(), isFinal()))),
- unless(isInstantiated()),
+ unless(anyOf(isInstantiated(), isImplicit())),
has(typeLoc(forEach(ExpensiveValueParamDecl))),
decl().bind("functionDecl")),
this);