On Tue, Oct 18, 2011 at 9:42 PM, Douglas Gregor <[email protected]> wrote: > > On Oct 13, 2011, at 10:09 PM, David Blaikie wrote: > > [& of course I forget to include the patch. Attached now] > > On Thu, Oct 13, 2011 at 10:09 PM, David Blaikie <[email protected]> wrote: >> >> From the bug: >> >> template<int ...Values, int After> struct X0nt; >> X0nt<42> f(); >> >> Causes clang to fail an assertion (SemaTemplate.cpp:4868 - "Converted >> template argument list is too short!"). This fix causes >> CheckTemplateArgumentList to fail if there are parameter packs anywhere >> other than the last argument in a non-partial application of the template >> arguments (partial applications include function templates for which >> non-final parameter packs may be valid. This change does not regress that >> behavior as far as I know/as far as the test cases already cover it). >> >> I've included a test for this fix. >> >> As an added bonus, I've also fixed a minor quirk in the output of the >> diagnostic that appears here ("template parameter pack must be the last >> template parameter") - currently/without my patch, Clang produces this >> diagnostic for every parameter after a parameter pack. So in the case of >> "template<typename ...A, typename B, typename C> struct foo;" the error is >> emitted twice (though, strangely, the second type it is produced it does not >> provide the context/line location, though the line/col numbers are the same >> & still correct). I've fixed that issue & modified a test case to catch it >> too. >> >> Let me know if this looks good & I'll check it in, > > LGTM!
Thanks Doug, committed as r142473 & resolved pr9786 as fixed. - David _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
