[clang-tools-extra] [run-clang-tidy] Accept directory as value for -export-fixes (PR #69453)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 18 07:15:44 PDT 2023


================
@@ -384,14 +386,26 @@ def main():
 
     clang_tidy_binary = find_binary(args.clang_tidy_binary, "clang-tidy", build_path)
 
-    tmpdir = None
     if args.fix:
         clang_apply_replacements_binary = find_binary(
             args.clang_apply_replacements_binary, "clang-apply-replacements", build_path
         )
 
-    if args.fix or (yaml and args.export_fixes):
-        tmpdir = tempfile.mkdtemp()
+    combine_fixes = False
+    export_fixes_dir = None
+    delete_fixes_dir = True
+    if args.export_fixes is not None:
+        assert not args.export_fixes.endswith(os.path.sep) or os.path.isdir(args.export_fixes), "The export fixes directory does not exist."
----------------
PiotrZSL wrote:

actually we could create directory if it does not exist

https://github.com/llvm/llvm-project/pull/69453


More information about the cfe-commits mailing list