aboutsummaryrefslogtreecommitdiff
path: root/clang-tidy/performance
diff options
context:
space:
mode:
authorFelix Berger <flx@google.com>2016-12-02 14:44:16 +0000
committerFelix Berger <flx@google.com>2016-12-02 14:44:16 +0000
commitd048dbfed5f2145934f89d3c2c8fe450fbfd8436 (patch)
tree8ad48b0975ec7a01436586eed12008b64c425b64 /clang-tidy/performance
parentf0f75fd2cbd88979d330abb42b1604babdda8f26 (diff)
[clang-tidy] Do not trigger unnecessary-value-param check on methods marked as final
Summary: Virtual method overrides of dependent types cannot be recognized unless they are marked as override or final. Exclude methods marked as final from check and add test. Reviewers: sbenza, hokein, alexfh Subscribers: malcolm.parsons, JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D27248 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@288502 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'clang-tidy/performance')
-rw-r--r--clang-tidy/performance/UnnecessaryValueParamCheck.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang-tidy/performance/UnnecessaryValueParamCheck.cpp b/clang-tidy/performance/UnnecessaryValueParamCheck.cpp
index ec99b3a3..5d746d6a 100644
--- a/clang-tidy/performance/UnnecessaryValueParamCheck.cpp
+++ b/clang-tidy/performance/UnnecessaryValueParamCheck.cpp
@@ -61,7 +61,8 @@ void UnnecessaryValueParamCheck::registerMatchers(MatchFinder *Finder) {
unless(referenceType())))),
decl().bind("param"));
Finder->addMatcher(
- functionDecl(isDefinition(), unless(cxxMethodDecl(isOverride())),
+ functionDecl(isDefinition(),
+ unless(cxxMethodDecl(anyOf(isOverride(), isFinal()))),
unless(isInstantiated()),
has(typeLoc(forEach(ExpensiveValueParamDecl))),
decl().bind("functionDecl")),