Skip to content

Commit 95fbd8d

Browse files
authored
[clangd] Don't ignore external HFI in SymbolCollector (#88446)
The `FileEntry` corresponds to a `FileID` containing the `SourceLocation` of a `NamedDecl` which (I think) might've been deserialized from a PCM file. Considering external `HeaderFileInfo` here is most likely the right thing to do here in order to get the correct spelling in case the current compiler instance has not register this file as a header yet.
1 parent 84df7a0 commit 95fbd8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang-tools-extra/clangd/index/SymbolCollector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ class SymbolCollector::HeaderFileURICache {
409409
// Framework headers are spelled as <FrameworkName/Foo.h>, not
410410
// "path/FrameworkName.framework/Headers/Foo.h".
411411
auto &HS = PP->getHeaderSearchInfo();
412-
if (const auto *HFI = HS.getExistingLocalFileInfo(*FE))
412+
if (const auto *HFI = HS.getExistingFileInfo(*FE))
413413
if (!HFI->Framework.empty())
414414
if (auto Spelling =
415415
getFrameworkHeaderIncludeSpelling(*FE, HFI->Framework, HS))

0 commit comments

Comments
 (0)