Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clangd] Unify printing policy for type hints
(This patch addresses the comment from https://reviews.llvm.org/D151785#4402460.) Previously, we used a special printing policy that enabled `PrintCanonicalTypes` to print type hints for structure bindings. This was intended to eliminate type aliases like `tuple_element::type`. However, this also caused TypePrinter to print default template arguments, which could result in losing the ability to see types like `std::basic_string<char>` if the fully expanded template-id exceeded the default inlay hint threshold. Simply getting the canonical type at the call site could help us get rid of the side effect. This also merges overloaded `addTypeHint` into one function without `PrintingPolicy`. Reviewed By: nridge Differential Revision: https://reviews.llvm.org/D152520
- Loading branch information
Showing
2 changed files
with
13 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters