This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Show non-instantiated decls in signatureHelp
ClosedPublic

Authored by ilya-biryukov on Aug 13 2018, 10:03 AM.

Details

Summary

To avoid producing very verbose output in substitutions involving
typedefs, e.g.

T -> std::vector<std::string>::iterator

gets turned into an unreadable mess when printed out for libstdc++,
result contains internal types (std::__Vector_iterator<...>) and
expanded well-defined typedefs (std::basic_string<char>).

Until we improve the presentation code in clang, going with
non-instantiated decls looks like a better UX trade-off.

Diff Detail

Repository
rL LLVM

Event Timeline

ilya-biryukov created this revision.Aug 13 2018, 10:03 AM
hokein accepted this revision.Aug 14 2018, 12:43 AM

looks good.

clangd/CodeComplete.cpp
721 ↗(On Diff #160382)

nit: auto*, the same below.

This revision is now accepted and ready to land.Aug 14 2018, 12:43 AM
ilya-biryukov marked an inline comment as done.
  • Use 'auto*' instead of 'auto'
ilya-biryukov added inline comments.Aug 14 2018, 2:12 AM
clangd/CodeComplete.cpp
721 ↗(On Diff #160382)

Good catch, thanks!

This revision was automatically updated to reflect the committed changes.