This is an archive of the discontinued LLVM Phabricator instance.

[clangd][Hover] Suppress initializers with many tokens
ClosedPublic

Authored by kadircet on Jan 26 2022, 8:59 AM.

Details

Summary

This results in excessive memory usage and eats a lot of screen estate.
Especially in the cases with lots of nested macro calls.

This patch tries to remedy it before the release cut by suppressing the
initializers. For better UX we should probably update the expression printer to
truncate those (behind some policy).

Related: https://github.com/clangd/clangd/issues/917

Diff Detail

Event Timeline

kadircet created this revision.Jan 26 2022, 8:59 AM
kadircet requested review of this revision.Jan 26 2022, 8:59 AM
sammccall accepted this revision.Jan 27 2022, 1:26 AM
sammccall added inline comments.
clang-tools-extra/clangd/Hover.cpp
131

Explain why

This revision is now accepted and ready to land.Jan 27 2022, 1:26 AM
kadircet updated this revision to Diff 403583.Jan 27 2022, 3:56 AM
  • Add comments about why we suppress initializer printing
kadircet marked an inline comment as done.Jan 27 2022, 3:56 AM
This revision was landed with ongoing or failed builds.Jan 27 2022, 4:02 AM
This revision was automatically updated to reflect the committed changes.