diff options
author | Kadir Cetinkaya <kadircet@google.com> | 2024-06-19 11:49:34 +0200 |
---|---|---|
committer | Kadir Cetinkaya <kadircet@google.com> | 2024-06-19 12:04:42 +0200 |
commit | e7b4b437fbbf087ac4955ed5945c3e2f3dd2b702 (patch) | |
tree | 6901f96c0efd5de5e1afd1e6eeb209c372eb99bd | |
parent | 4c8ce5d3012cc9f16ab8fee5ec444f6036cb099e (diff) | |
download | llvm-e7b4b437fbbf087ac4955ed5945c3e2f3dd2b702.zip llvm-e7b4b437fbbf087ac4955ed5945c3e2f3dd2b702.tar.gz llvm-e7b4b437fbbf087ac4955ed5945c3e2f3dd2b702.tar.bz2 |
[include-cleaner] Use filename as requested, not resolved path
This was an unintended change in d5297b72aa32ad3a69563a1fcc61294282f0b379.
We don't want to resolve symlinks in filenames, as these might lead to
unexpected spellings, compared to requested filenames.
-rw-r--r-- | clang-tools-extra/include-cleaner/lib/IncludeSpeller.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/include-cleaner/lib/IncludeSpeller.cpp b/clang-tools-extra/include-cleaner/lib/IncludeSpeller.cpp index 8332eb6..d054982 100644 --- a/clang-tools-extra/include-cleaner/lib/IncludeSpeller.cpp +++ b/clang-tools-extra/include-cleaner/lib/IncludeSpeller.cpp @@ -37,8 +37,8 @@ public: .getCurrentWorkingDirectory()) WorkingDir = *WD; std::string FinalSpelling = Input.HS.suggestPathToFileForDiagnostics( - Input.H.resolvedPath(), WorkingDir, Input.Main->tryGetRealPathName(), - &IsAngled); + Input.H.physical().getName(), WorkingDir, + Input.Main->tryGetRealPathName(), &IsAngled); return IsAngled ? "<" + FinalSpelling + ">" : "\"" + FinalSpelling + "\""; } llvm_unreachable("Unknown clang::include_cleaner::Header::Kind enum"); |