This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Fixed printTemplateSpecializationArgs not printing partial variable specialization arguments.
ClosedPublic

Authored by jvikstrom on Aug 8 2019, 12:35 AM.

Details

Summary

printTemplateSpecializationArgs was not printing partial variable specialization args. This adds an additional If clause where we check if it's a VariableTemplatePartialSpecializationDecl and returns the ArgumentLocs if that's the case.
Also adds tests for printTemplateSpecializationArgs in ASTTests.cpp.

Event Timeline

jvikstrom created this revision.Aug 8 2019, 12:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2019, 12:35 AM
hokein added inline comments.Aug 8 2019, 5:22 AM
clang-tools-extra/clangd/unittests/ASTTests.cpp
40

looks like the related tests are in PrintASTTests.cpp, could you move the test there?

jvikstrom updated this revision to Diff 214132.Aug 8 2019, 6:20 AM
jvikstrom marked 2 inline comments as done.

Merged test with PrintASTTest.cpp.

jvikstrom added inline comments.Aug 8 2019, 6:21 AM
clang-tools-extra/clangd/unittests/ASTTests.cpp
40

Oh I didn't see that test file. Seems like a lot of this is already tested, so just removing everything that isn't related to template variables.

hokein accepted this revision.Aug 8 2019, 6:58 AM
This revision is now accepted and ready to land.Aug 8 2019, 6:58 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2019, 12:34 AM