This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Improve hover for auto on template instantiations
AbandonedPublic

Authored by kadircet on Dec 16 2019, 6:30 AM.

Details

Reviewers
ilya-biryukov
Summary

Follow-up to D71543

Diff Detail

Event Timeline

kadircet created this revision.Dec 16 2019, 6:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 16 2019, 6:30 AM

Unit tests: pass. 60957 tests passed, 0 failed and 726 were skipped.

clang-format: pass.

Build artifacts: diff.json, CMakeCache.txt, console-log.txt, test-results.xml

ilya-biryukov added inline comments.Dec 17 2019, 2:12 AM
clang-tools-extra/clangd/unittests/HoverTests.cpp
556

NIT: Maybe remove default argument from this test for now and file a bug for fixing this instead?
Tracking this in the issue tracker seems to be better than in code.

kadircet marked 2 inline comments as done.Dec 17 2019, 2:29 AM
kadircet added inline comments.
clang-tools-extra/clangd/unittests/HoverTests.cpp
556
kadircet abandoned this revision.Dec 17 2019, 6:41 AM
kadircet marked an inline comment as done.

integrated into D71543

sammccall added inline comments.
clang-tools-extra/clangd/unittests/HoverTests.cpp
1209

Hang on, I think we're going round in circles with this design.

IIRC the idea was that Name doesn't include template parameters, signature, etc, so clients control rendering.

Isn't it easy to reconstitute this from the template argument list in the hover info?

kadircet marked an inline comment as done.Dec 18 2019, 1:57 AM
kadircet added inline comments.
clang-tools-extra/clangd/unittests/HoverTests.cpp
1209

we were only storing template parameters, not arguments. they've always been the part of the name, they had disappeared after a previous patch, as an intermediate state and this was introducing them back.

i am planning to move template arguments into a different field though, as template parameters, which should also help with dropping default arguments.