[all-commits] [llvm/llvm-project] 4cda28: [clang-include-cleaner] Fix incorrect directory is...

Byoungchan Lee via All-commits all-commits at lists.llvm.org
Thu Oct 17 01:16:28 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4cda28c1ada702a08f6960eb4c93919187c1d4d1
      https://github.com/llvm/llvm-project/commit/4cda28c1ada702a08f6960eb4c93919187c1d4d1
  Author: Byoungchan Lee <byoungchan.lee at gmx.com>
  Date:   2024-10-17 (Thu, 17 Oct 2024)

  Changed paths:
    M clang-tools-extra/include-cleaner/test/tool.cpp
    M clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp

  Log Message:
  -----------
  [clang-include-cleaner] Fix incorrect directory issue for writing files (#111375)

If the current working directory of `clang-include-cleaner` differs from
the directory of the input files specified in the compilation database,
it doesn't adjust the input file paths properly. As a result,
`clang-include-cleaner` either writes files to the wrong directory or
fails to write files altogether.

This pull request fixes the issue by adjusting the input file paths
based on the directory specified in the compilation database. If that
directory is not writable, `clang-include-cleaner` will write the output
relative to the current working directory.

Fixes #110843.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list