diff options
author | Malcolm Parsons <malcolm.parsons@gmail.com> | 2017-01-23 13:18:08 +0000 |
---|---|---|
committer | Malcolm Parsons <malcolm.parsons@gmail.com> | 2017-01-23 13:18:08 +0000 |
commit | d61565aaf0d7a19386eaaa23095283e1df122225 (patch) | |
tree | ac03f212f596f70eb22ab0b16e8650ce24e4bbfb /clang-tidy/performance | |
parent | b83a544e611dbcec607644877c137546f665248a (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@292786 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'clang-tidy/performance')
-rw-r--r-- | clang-tidy/performance/UnnecessaryValueParamCheck.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tidy/performance/UnnecessaryValueParamCheck.cpp b/clang-tidy/performance/UnnecessaryValueParamCheck.cpp index 4c123181..cde30a62 100644 --- a/clang-tidy/performance/UnnecessaryValueParamCheck.cpp +++ b/clang-tidy/performance/UnnecessaryValueParamCheck.cpp @@ -74,7 +74,7 @@ void UnnecessaryValueParamCheck::registerMatchers(MatchFinder *Finder) { 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); |