<div dir="ltr"><div><div><div><div><div><div><div><div>Hi<br></div>I was experimenting with printing out variadic templates with clang.<br></div>I had a slight issue with how TypePrinter works for function arguments in variadic function templates.<br>

<br></div>If I have this in my original source file:<br>template <typename T, typename ...U><br>void foo(T t,U... args)<br>{<br>    <br>}<br><br></div>TypePrinter currently generates this:<br>U args...<br></div>which should have been<br>

</div>U... args<br></div>as far as I know.<br><br></div><div>Is there some policy I can set to change this behaviour?<br><br></div><div>I had to slightly modify the the implementation to get what I expected.<br><br></div>

<div>There are two functions in TypePrinter.cpp as follows:<br></div><div><div><div><div><br>void TypePrinter::printPackExpansionBefore(const PackExpansionType *T, <br>                                           raw_ostream &OS) {<br>

  printBefore(T->getPattern(), OS);<br>  OS << "...";<br>}<br>void TypePrinter::printPackExpansionAfter(const PackExpansionType *T, <br>                                          raw_ostream &OS) {<br>

<br>    printAfter(T->getPattern(), OS);<br><br>}<br><br></div><div>The line:<br><br></div><div>OS << "...";<br><br></div><div>was previously in printPackExpansionAfter.<br><br></div><div>Why ?<br></div>

<div>Any side effects of moving it to the before function, as I did ?<br></div><div><br></div><div>Manasij Mukherjee<br></div><div><br></div></div></div></div></div>