This is an archive of the discontinued LLVM Phabricator instance.

Print default template argument if manually specified in typedef declaration.
ClosedPublic

Authored by reikdas on May 24 2021, 12:05 PM.

Details

Summary

If a default template type argument is manually specified to be of the default type, then it is committed when printing the template.

Diff Detail

Event Timeline

reikdas requested review of this revision.May 24 2021, 12:05 PM
reikdas created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMay 24 2021, 12:05 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
rjmccall accepted this revision.Jun 4 2021, 9:59 AM

LGTM

This revision is now accepted and ready to land.Jun 4 2021, 9:59 AM
dblaikie added inline comments.
clang/test/SemaTemplate/class-template-id.cpp
12–14

FWIW, looks like this was a reduction in quality - printing the value of the default argument in these error messages, when omitting it was probably desirable?

& doesn't seem to be a necessary consequence of the patch description's goals.

dblaikie added inline comments.Jun 30 2021, 9:58 AM
clang/test/SemaTemplate/class-template-id.cpp
12–14

Nevermind - I was looking at the parameter types, not the return type. I see the return type is written out more explicitly, so it makes sense that that fuller name be rendered in the message too.