[PATCH] D108975: [clangd] Omit default template arguments from type hints

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 2 02:23:01 PDT 2021


kadircet added a comment.

thanks, lgtm!



================
Comment at: clang-tools-extra/clangd/InlayHints.cpp:353
   const HeuristicResolver *Resolver;
   PrintingPolicy TypeHintPolicy;
+  PrintingPolicy StructuredBindingPolicy;
----------------
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.
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108975/new/

https://reviews.llvm.org/D108975



More information about the cfe-commits mailing list