[clang-tools-extra] r318922 - [clang-tidy] rename_check.py: fix a bug in check presence detection

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 23 06:59:19 PST 2017


Author: alexfh
Date: Thu Nov 23 06:59:19 2017
New Revision: 318922

URL: http://llvm.org/viewvc/llvm-project?rev=318922&view=rev
Log:
[clang-tidy] rename_check.py: fix a bug in check presence detection

Modified:
    clang-tools-extra/trunk/clang-tidy/rename_check.py

Modified: clang-tools-extra/trunk/clang-tidy/rename_check.py
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/rename_check.py?rev=318922&r1=318921&r2=318922&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/rename_check.py (original)
+++ clang-tools-extra/trunk/clang-tidy/rename_check.py Thu Nov 23 06:59:19 2017
@@ -61,7 +61,7 @@ def deleteMatchingLines(fileName, patter
     lines = f.readlines()
 
   not_matching_lines = [l for l in lines if not re.search(pattern, l)]
-  if not_matching_lines.count == lines.count:
+  if len(not_matching_lines) == len(lines):
     return False
 
   print("Removing lines matching '%s' in '%s'..." % (pattern, fileName))




More information about the cfe-commits mailing list