This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Don't format typename template parameters as expression
ClosedPublic

Authored by rymiel on Mar 31 2023, 5:04 AM.

Details

Summary

bb4f6c4dca98a47054117708015bb2724256ee83 made it so that template
parameter defaults are seen akin to assignments and formatted as
expressions, however, the patch did this for all template parameters,
even for typename template parameters.

This patch formats typename and class template parameters as types.

Fixes https://github.com/llvm/llvm-project/issues/61841

Diff Detail

Event Timeline

rymiel created this revision.Mar 31 2023, 5:04 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 31 2023, 5:04 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
rymiel requested review of this revision.Mar 31 2023, 5:04 AM
MyDeveloperDay accepted this revision.Mar 31 2023, 5:13 AM
This revision is now accepted and ready to land.Mar 31 2023, 5:13 AM
owenpan accepted this revision.Mar 31 2023, 4:20 PM
This revision was landed with ongoing or failed builds.Apr 1 2023, 6:48 AM
This revision was automatically updated to reflect the committed changes.