This is an archive of the discontinued LLVM Phabricator instance.

[clangd] AddUsing: Fix support for template specializations.
ClosedPublic

Authored by adamcz on Oct 26 2021, 6:12 AM.

Details

Summary

Before this change, we would add "using std::vector<int>" instead of
just "using std::vector;", which would not even compile.

Fixes https://github.com/clangd/clangd/issues/904

Diff Detail

Event Timeline

adamcz created this revision.Oct 26 2021, 6:12 AM
adamcz requested review of this revision.Oct 26 2021, 6:12 AM
kadircet accepted this revision.Oct 26 2021, 7:31 AM

thanks!

clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp
284

nit: NameRange.setEnd(T.getTemplateNameLoc()).

This revision is now accepted and ready to land.Oct 26 2021, 7:31 AM
adamcz marked an inline comment as done.Oct 26 2021, 8:12 AM
adamcz removed a reviewer: usaxena95.

Thanks Kadir!

adamcz updated this revision to Diff 382335.Oct 26 2021, 8:13 AM

review comments

This revision was landed with ongoing or failed builds.Oct 26 2021, 8:35 AM
This revision was automatically updated to reflect the committed changes.

(oops, i didn't notice i wasn't the reviewer :D)

No worries. Thanks for taking a look :)