Skip to content

Commit e7b4b43

Browse files
committed
[include-cleaner] Use filename as requested, not resolved path
This was an unintended change in d5297b7. We don't want to resolve symlinks in filenames, as these might lead to unexpected spellings, compared to requested filenames.
1 parent 4c8ce5d commit e7b4b43

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang-tools-extra/include-cleaner/lib/IncludeSpeller.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class DefaultIncludeSpeller : public IncludeSpeller {
3737
.getCurrentWorkingDirectory())
3838
WorkingDir = *WD;
3939
std::string FinalSpelling = Input.HS.suggestPathToFileForDiagnostics(
40-
Input.H.resolvedPath(), WorkingDir, Input.Main->tryGetRealPathName(),
41-
&IsAngled);
40+
Input.H.physical().getName(), WorkingDir,
41+
Input.Main->tryGetRealPathName(), &IsAngled);
4242
return IsAngled ? "<" + FinalSpelling + ">" : "\"" + FinalSpelling + "\"";
4343
}
4444
llvm_unreachable("Unknown clang::include_cleaner::Header::Kind enum");

0 commit comments

Comments
 (0)