[clang-tidy] fix None tmpdir when exporting fixes in run-clang-tidy
authorJulian Schmidt <44101708+5chmidti@users.noreply.github.com>
Sat, 12 Aug 2023 16:17:54 +0000 (16:17 +0000)
committerTobias Hieta <tobias@hieta.se>
Mon, 14 Aug 2023 08:35:36 +0000 (10:35 +0200)
commit5a600592de19655c4ab41ddff738f7082cce17a2
treeb208d8ecb34958c7d465e4c8d9b2bc4b4e759ca2
parentf3e3c5a922c72c2b483f2ec6dc1dfdb938382203
[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

(cherry picked from commit c3da99275a520b73235d975017502876e07e3e8e)
clang-tools-extra/clang-tidy/tool/run-clang-tidy.py