Summary
This patch adds a IsDefaulted field to clang::TemplateArgument.
To prevent memory footprint increase we steal 1 bit from ArgKind.
Background
In LLDB we construct ASTs from debug-info and hand it to clang
to perform actions such as printing/formatting typenames.
Some debug formats, specifically DWARF, may only encode information
about class template instantiations, losing the structure of the generic
class definition. However, the clang::TypePrinter needs a properly
constructed ClassTemplateDecl with generic default argument decls
to be able to deduce whether a ClassTemplateSpecializationDecl was
instantiatiated with TemplateArguments that correspond to the
defaults. LLDB does know whether a particular template argument was
defaulted, but can't currently tell clang about it.
This patch allows LLDB to set the defaulted-ness of a TemplateArgument
and thus benefit more from clang::TypePrinter.
See discussion in https://reviews.llvm.org/D140423
Testing
- TODO
@Michael137, hasn't IsDefaulted parameter forgotten here?