[PATCH] D151785: [clangd] Desugar dependent type aliases for auto type hints

Younan Zhang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 4 04:52:37 PDT 2023


zyounan added inline comments.


================
Comment at: clang-tools-extra/clangd/InlayHints.cpp:267
     StructuredBindingPolicy = TypeHintPolicy;
     StructuredBindingPolicy.PrintCanonicalTypes = true;
   }
----------------
`PrintCanonicalTypes` turns on printing default template arguments, which would prevent the patch from printing, e.g., `std::basic_string<char>`, within the default length limitation.

```
std::map<std::string, int> Map;

for (auto &[Key, Value] : Map) // Key: basic_string<char, char_traits<char>, allocator<char>>, whose length exceeds the default threshold.

```

Is it safe to drop it now? I believe this patch can handle the case the comment mentioned.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151785



More information about the cfe-commits mailing list