[PATCH] D70196: [clang-include-fixer] Skip .rc files when finding symbols

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 13 11:34:16 PST 2019


rnk created this revision.
rnk added reviewers: sammccall, bkramer.
Herald added a project: clang.

For some reason CMake includes entries for .rc files, but
find-all-symbols handles them improperly.

See PR43993


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70196

Files:
  clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py


Index: clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
===================================================================
--- clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
+++ clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
@@ -89,6 +89,9 @@
   database = json.load(open(os.path.join(build_path, db_path)))
   files = [entry['file'] for entry in database]
 
+  # Filter out .rc files on Windows. CMake includes them for some reason.
+  files = [f for f in files if not f.endswith('.rc')]
+
   max_task = args.j
   if max_task == 0:
     max_task = multiprocessing.cpu_count()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70196.229146.patch
Type: text/x-patch
Size: 687 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191113/6f708cec/attachment.bin>


More information about the cfe-commits mailing list