[clang-tidy] fix None tmpdir when exporting fixes in run-clang-tidy

Differential https://reviews.llvm.org/D145477 removed the check for `(yaml and args.export_fixes)` in line 303 to skip looking for the `clang-apply-replacements` binary. However, the `tmpdir` variable was set in this true branch when exporting fixes and therefore is `None` when invoking run-clang-tidy with `run-clang-tidy -p . -export-fixes fixes.yaml`.

Reviewed By: PiotrZSL

Differential Revision: https://reviews.llvm.org/D157773
This commit is contained in:
Julian Schmidt 2023-08-12 16:17:54 +00:00 committed by Piotr Zegar
parent 45500fa08a
commit c3da99275a

View File

@ -389,6 +389,8 @@ def main():
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()
try: