[clangd] Use FileEntryRef for canonicalizing filepaths.
authorUtkarsh Saxena <usx@google.com>
Thu, 13 Apr 2023 10:47:52 +0000 (12:47 +0200)
committerUtkarsh Saxena <usx@google.com>
Thu, 13 Apr 2023 14:49:30 +0000 (16:49 +0200)
commited365f464a0a29da08d0a1011603c4cd337c9428
tree99f9f740def6b06e114c897ef67345f54782fce5
parent18b1a7a5d13f21c4251092e845226df1004aa654
[clangd] Use FileEntryRef for canonicalizing filepaths.

Using FileEntry for retrieving filenames give the name used for the last access. FileEntryRef gives the first access name.

Last access name is suspected to change with unrelated changes in clang or the underlying filesystem. First access name gives more stability to the name and makes it easier to track.

Differential Revision: https://reviews.llvm.org/D148213
clang-tools-extra/clangd/Diagnostics.cpp
clang-tools-extra/clangd/IncludeCleaner.cpp
clang-tools-extra/clangd/SourceCode.cpp
clang-tools-extra/clangd/SourceCode.h
clang-tools-extra/clangd/XRefs.cpp
clang-tools-extra/clangd/index/Background.cpp
clang-tools-extra/clangd/index/SymbolCollector.cpp
clang-tools-extra/clangd/indexer/IndexerMain.cpp
clang-tools-extra/clangd/refactor/Tweak.cpp