summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/misc
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2017-08-09 22:09:29 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2017-08-09 22:09:29 +0000
commit1436192d68e5f9a723a52d3336088f3d47447c8c (patch)
treed975fc4e64c18d9c4de80017f44b5cdccee57a7e /clang-tools-extra/clang-tidy/misc
parent324d96b83aa5cd3a828fd8d243f71d9862246211 (diff)
downloadbcm5719-llvm-1436192d68e5f9a723a52d3336088f3d47447c8c.tar.gz
bcm5719-llvm-1436192d68e5f9a723a52d3336088f3d47447c8c.zip
[clang-tidy] Don't compute the edit distance if it's over the threshold.
No functional change intended. llvm-svn: 310532
Diffstat (limited to 'clang-tools-extra/clang-tidy/misc')
-rw-r--r--clang-tools-extra/clang-tidy/misc/VirtualNearMissCheck.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/clang-tidy/misc/VirtualNearMissCheck.cpp b/clang-tools-extra/clang-tidy/misc/VirtualNearMissCheck.cpp
index 043540666d3..fd74bb6692e 100644
--- a/clang-tools-extra/clang-tidy/misc/VirtualNearMissCheck.cpp
+++ b/clang-tools-extra/clang-tidy/misc/VirtualNearMissCheck.cpp
@@ -244,8 +244,8 @@ void VirtualNearMissCheck::check(const MatchFinder::MatchResult &Result) {
if (isOverriddenByDerivedClass(BaseMD, DerivedRD))
continue;
- unsigned EditDistance =
- BaseMD->getName().edit_distance(DerivedMD->getName());
+ unsigned EditDistance = BaseMD->getName().edit_distance(
+ DerivedMD->getName(), EditDistanceThreshold);
if (EditDistance > 0 && EditDistance <= EditDistanceThreshold) {
if (checkOverrideWithoutName(Context, BaseMD, DerivedMD)) {
// A "virtual near miss" is found.
OpenPOWER on IntegriCloud