This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Disable suffix matching fallback for C during include insertion
ClosedPublic

Authored by kadircet on Sep 23 2020, 5:32 AM.

Details

Summary

Clangd currently doesn't respect language and breaks the builds with
include insertion for C. This patch aims to stop the bleeding by not mapping
back to CPP standard library headers.

Improves https://github.com/clangd/clangd/issues/376.

Diff Detail

Event Timeline

kadircet created this revision.Sep 23 2020, 5:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 23 2020, 5:32 AM
kadircet requested review of this revision.Sep 23 2020, 5:32 AM
sammccall accepted this revision.Sep 23 2020, 11:47 AM

(I do wonder whether it's safe to just drop the mapping table entirely now...)

This revision is now accepted and ready to land.Sep 23 2020, 11:47 AM

(I do wonder whether it's safe to just drop the mapping table entirely now...)

As discussed offline;
It still helps with mapping symbols missing from our cppreference extraction back to umbrella headers. Not sure how often this happens in practice anymore, but it will likely be a regression.
So gonna drop it completely in a different patch, which can be reverted quickly if things go wrong. That way we'll learn about what's currently missing, rather than masking the bugs.