[PATCH] D112926: run-clang-tidy.py analyze unique files only

Serikzhan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 1 21:30:46 PDT 2021


serkazi updated this revision to Diff 383959.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112926/new/

https://reviews.llvm.org/D112926

Files:
  clang-tools-extra/clang-tidy/tool/run-clang-tidy.py


Index: clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
===================================================================
--- clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+++ clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
@@ -273,8 +273,8 @@
 
   # Load the database and extract all files.
   database = json.load(open(os.path.join(build_path, db_path)))
-  files = [make_absolute(entry['file'], entry['directory'])
-           for entry in database]
+  files = set([make_absolute(entry['file'], entry['directory'])
+           for entry in database])
 
   max_task = args.j
   if max_task == 0:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112926.383959.patch
Type: text/x-patch
Size: 613 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211102/ca88c37d/attachment.bin>


More information about the cfe-commits mailing list