From d2db601496fc7ccbf0f689bbcafa3796e7c15141 Mon Sep 17 00:00:00 2001 From: akuegel Date: Mon, 24 Nov 2014 10:10:17 -0800 Subject: [PATCH] Don't filter by extensions. When using the -all option in run_tool.py, don't filter the files in the compilation database by extension. Otherwise, files ending in ".S", ".cxx" and ".cpp" are filtered out. BUG=429684 Review URL: https://codereview.chromium.org/743133002 Cr-Commit-Position: refs/heads/master@{#305445} --- tools/clang/scripts/run_tool.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/clang/scripts/run_tool.py b/tools/clang/scripts/run_tool.py index 3725ca3e9771..58a9a86570c6 100755 --- a/tools/clang/scripts/run_tool.py +++ b/tools/clang/scripts/run_tool.py @@ -314,14 +314,14 @@ def main(argv): clang_format_diff_path = None if len(argv) == 3 and argv[2] == '--all': - filenames = frozenset(_GetFilesFromCompileDB(argv[1])) + filenames = set(_GetFilesFromCompileDB(argv[1])) else: - filenames = frozenset(_GetFilesFromGit(argv[2:])) - # Filter out files that aren't C/C++/Obj-C/Obj-C++. - extensions = frozenset(('.c', '.cc', '.m', '.mm')) - dispatcher = _CompilerDispatcher(argv[0], argv[1], - [f for f in filenames - if os.path.splitext(f)[1] in extensions]) + filenames = set(_GetFilesFromGit(argv[2:])) + # Filter out files that aren't C/C++/Obj-C/Obj-C++. + extensions = frozenset(('.c', '.cc', '.m', '.mm')) + filenames = [f for f in filenames + if os.path.splitext(f)[1] in extensions] + dispatcher = _CompilerDispatcher(argv[0], argv[1], filenames) dispatcher.Run() # Filter out edits to files that aren't in the git repository, since it's not # useful to modify files that aren't under source control--typically, these -- 2.11.4.GIT