[clang-tools-extra] r310532 - [clang-tidy] Don't compute the edit distance if it's over the threshold.
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 9 15:09:29 PDT 2017
Author: d0k
Date: Wed Aug 9 15:09:29 2017
New Revision: 310532
URL: http://llvm.org/viewvc/llvm-project?rev=310532&view=rev
Log:
[clang-tidy] Don't compute the edit distance if it's over the threshold.
No functional change intended.
Modified:
clang-tools-extra/trunk/clang-tidy/misc/VirtualNearMissCheck.cpp
Modified: clang-tools-extra/trunk/clang-tidy/misc/VirtualNearMissCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/VirtualNearMissCheck.cpp?rev=310532&r1=310531&r2=310532&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/VirtualNearMissCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/VirtualNearMissCheck.cpp Wed Aug 9 15:09:29 2017
@@ -244,8 +244,8 @@ void VirtualNearMissCheck::check(const M
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.
More information about the cfe-commits
mailing list