Page MenuHomePhabricator

[clangd] Only publish preamble after rebuilds
ClosedPublic

Authored by kadircet on Oct 20 2021, 6:13 AM.

Details

Summary

Don't invoke parsing callback for preamble if clangd is using a
previously built one.

Diff Detail

Event Timeline

kadircet created this revision.Oct 20 2021, 6:13 AM
kadircet requested review of this revision.Oct 20 2021, 6:13 AM
sammccall accepted this revision.Oct 20 2021, 6:34 AM
sammccall added inline comments.
clang-tools-extra/clangd/TUScheduler.cpp
904

I think it would be clearer to invert the sense here (ReusedPreamble=false).

This avoids the "tension" of saying RebuiltPreamble=true when we haven't built one yet, and then having to ensure we satisfy that promise later.

This revision is now accepted and ready to land.Oct 20 2021, 6:34 AM
This revision was automatically updated to reflect the committed changes.
kadircet marked an inline comment as done.