[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
Please sign in to comment