This is an archive of the discontinued LLVM Phabricator instance.

[Lex] Preambles should contain the global module fragment.
ClosedPublic

Authored by sammccall on Aug 21 2023, 9:58 AM.

Details

Summary

For applications like clangd, the preamble remains an important optimization
when editing a module definition. The global module fragment is a good fit for
it as it by definition contains only preprocessor directives.
Before this patch, we would terminate the preamble immediately at the "module"
keyword.

Diff Detail

Event Timeline

sammccall created this revision.Aug 21 2023, 9:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 21 2023, 9:58 AM
sammccall requested review of this revision.Aug 21 2023, 9:58 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 21 2023, 9:58 AM
ChuanqiXu accepted this revision.Aug 21 2023, 11:13 PM

LGTM. Thanks!

This revision is now accepted and ready to land.Aug 21 2023, 11:13 PM
This revision was landed with ongoing or failed builds.Aug 22 2023, 2:56 AM
This revision was automatically updated to reflect the committed changes.