[PATCH] D114522: [clangd] Add desugared type to hover

liu hui via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 26 01:25:40 PST 2021


lh123 added inline comments.


================
Comment at: clang-tools-extra/clangd/Hover.cpp:166
+    if (ShouldAKA)
+      AKA = Result + DesugaredTy.getAsString(PP);
+  }
----------------
lh123 wrote:
> lh123 wrote:
> > It seems we lost `namespace qualifiers`.
> > It always display `std::string` as `basic_string<char>`
> Should we set `FullyQualifiedName` printing policy  for `DesugaredTy`.
Sometimes we need to distinguish certain types with the same name based on the `fully qualified name`.
eg.
```
namespace custom {
template <typename T> struct vector {};
} // namespace custom

void code() {
  custom::vector<size_t> a;
  std::vector<size_t> b;
}
```
Currently, both `a` and `b` show `vector<unsigned long>`.


Repository:
  rZORG LLVM Github Zorg

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

https://reviews.llvm.org/D114522



More information about the cfe-commits mailing list