This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Always allow diagnostics from stale preambles
ClosedPublic

Authored by kadircet on Jun 27 2023, 8:06 AM.

Details

Summary

We've been running this internally for months now, without any
stability or correctness concerns. It has ~40% speed up on incremental
diagnostics latencies (as preamble can get invalidated through code completion
etc.).

Diff Detail

Event Timeline

kadircet created this revision.Jun 27 2023, 8:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2023, 8:06 AM
kadircet requested review of this revision.Jun 27 2023, 8:06 AM
kadircet updated this revision to Diff 534995.Jun 27 2023, 8:07 AM
  • Squash base commit
hokein accepted this revision.Jun 28 2023, 1:21 AM
hokein added inline comments.
clang-tools-extra/clangd/ConfigYAML.cpp
137

I wonder whether it is worth keeping this flag, but no-op (just emitting an warning message, this flag is no-op).

Probably not worth, since this flag was introduced recently, and it is not in any release.

clang-tools-extra/clangd/ParsedAST.h
156–157

nit: update the comment.

This revision is now accepted and ready to land.Jun 28 2023, 1:21 AM
kadircet marked an inline comment as done.Jun 28 2023, 1:38 AM
kadircet added inline comments.
clang-tools-extra/clangd/ConfigYAML.cpp
137

that's what happens to unrecognized config keys already. user will get a diag message when parsing their config that says AllowStalePreamble is not recognized.

This revision was automatically updated to reflect the committed changes.
kadircet marked an inline comment as done.