This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Omit default template arguments from type hints
ClosedPublic

Authored by nridge on Aug 31 2021, 1:34 AM.

Diff Detail

Event Timeline

nridge created this revision.Aug 31 2021, 1:34 AM
nridge requested review of this revision.Aug 31 2021, 1:34 AM

thanks, lgtm!

clang-tools-extra/clangd/InlayHints.cpp
359–360

can we document why we need to policies here, probably something like:

We want to suppress default template arguments and print canonical types, unfortunately they're conflicting policies hence we can't have both.
For regular types, suppressing default template arguments is more important, whereas printing canonical types is crucial for structured bindings. Therefore we use 2 separate policies.
kadircet accepted this revision.Sep 2 2021, 2:23 AM
This revision is now accepted and ready to land.Sep 2 2021, 2:23 AM
nridge updated this revision to Diff 370994.Sep 6 2021, 11:37 PM
nridge marked an inline comment as done.

Address review comment

This revision was landed with ongoing or failed builds.Sep 6 2021, 11:38 PM
This revision was automatically updated to reflect the committed changes.