/// enclosing the template arguments.
static std::string PrintTemplateArgumentList(const TemplateArgument *Args,
unsigned NumArgs,
- const PrintingPolicy &Policy);
+ const PrintingPolicy &Policy,
+ bool SkipBrackets = false);
static std::string PrintTemplateArgumentList(const TemplateArgumentLoc *Args,
unsigned NumArgs,
TemplateSpecializationType::PrintTemplateArgumentList(
const TemplateArgument *Args,
unsigned NumArgs,
- const PrintingPolicy &Policy) {
+ const PrintingPolicy &Policy,
+ bool SkipBrackets) {
std::string SpecString;
- SpecString += '<';
+ if (!SkipBrackets)
+ SpecString += '<';
+
for (unsigned Arg = 0; Arg < NumArgs; ++Arg) {
- if (Arg)
+ if (SpecString.size() > !SkipBrackets)
SpecString += ", ";
// Print the argument into a string.
std::string ArgString;
- {
+ if (Args[Arg].getKind() == TemplateArgument::Pack) {
+ ArgString = PrintTemplateArgumentList(Args[Arg].pack_begin(),
+ Args[Arg].pack_size(),
+ Policy, true);
+ } else {
llvm::raw_string_ostream ArgOut(ArgString);
Args[Arg].print(Policy, ArgOut);
}
if (SpecString[SpecString.size() - 1] == '>')
SpecString += ' ';
- SpecString += '>';
+ if (!SkipBrackets)
+ SpecString += '>';
return SpecString;
}
std::string SpecString;
SpecString += '<';
for (unsigned Arg = 0; Arg < NumArgs; ++Arg) {
- if (Arg)
+ if (SpecString.size() > 1)
SpecString += ", ";
// Print the argument into a string.
std::string ArgString;
- {
+ if (Args[Arg].getArgument().getKind() == TemplateArgument::Pack) {
+ ArgString = PrintTemplateArgumentList(
+ Args[Arg].getArgument().pack_begin(),
+ Args[Arg].getArgument().pack_size(),
+ Policy, true);
+ } else {
llvm::raw_string_ostream ArgOut(ArgString);
Args[Arg].getArgument().print(Policy, ArgOut);
}
*il_pairs;
tuple<pair<int, unsigned int>, pair<long, unsigned long> >*il_pairs_2 = il_pairs;
-ExpansionLengthMismatch<short, int, long>::Inner<unsigned int, unsigned long>::type // expected-note{{in instantiation of}}
+ExpansionLengthMismatch<short, int, long>::Inner<unsigned int, unsigned long>::type // expected-note{{in instantiation of template class 'ExpansionLengthMismatch<short, int, long>::Inner<unsigned int, unsigned long>' requested here}}
*il_pairs_bad;