This is an archive of the discontinued LLVM Phabricator instance.

[clang][TypePrinter] Test TemplateArgument::IsDefaulted when omitting default arguments
ClosedPublic

Authored by Michael137 on Jan 16 2023, 1:29 AM.

Details

Summary

Summary

This patch allows clients who can't properly construct
a ClassTemplateDecl to still benefit from the clang::TypePrinters
ability to skip printing defaulted template arguments. The
clients simply have to call TemplateArgument::setIsDefaulted
in advance.

See discussion in https://reviews.llvm.org/D140423

Diff Detail

Event Timeline

Michael137 created this revision.Jan 16 2023, 1:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 16 2023, 1:29 AM
Michael137 requested review of this revision.Jan 16 2023, 1:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 16 2023, 1:29 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
Michael137 retitled this revision from [WIP][clang][TypePrinter] Test TemplateArgument::IsDefaulted when omitting default arguments to [clang][TypePrinter] Test TemplateArgument::IsDefaulted when omitting default arguments.Jan 23 2023, 1:33 AM
Michael137 edited the summary of this revision. (Show Details)
aprantl accepted this revision.Jan 26 2023, 9:39 AM
This revision is now accepted and ready to land.Jan 26 2023, 9:39 AM
erichkeane accepted this revision.Jan 26 2023, 9:40 AM
This revision was landed with ongoing or failed builds.Jan 26 2023, 6:35 PM
This revision was automatically updated to reflect the committed changes.

This caused some LLDB test failures for the import-std-module setting. https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/

We construct TemplateArguments manually in the CxxModuleHandler. Fix is in-flight.