diff options
author | Chris Lattner <sabre@nondot.org> | 2010-05-20 00:25:36 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-05-20 00:25:36 +0000 |
commit | 98d279ba8092186f606abaa8298f13a0816b9cf2 (patch) | |
tree | dfbfc4d87155f9290e3773be7c444f1d2514daec /lib/CodeGen/CGBlocks.cpp | |
parent | 885989109ade7cb4dc493e25da41456c64b3cf6a (diff) |
switch TemplateArgumentListBuilder to hold its flat argument list in a smallvector
instead of new[]'d. This greatly reduces the number of new[]'s, and guess what,
they were all leaked.
This adds a fixme in this hunk:
unsigned NumPackArgs = NumFlatArgs - PackBeginIndex;
+ // FIXME: NumPackArgs shouldn't be negative here???
if (NumPackArgs)
- PackArgs = &FlatArgs[PackBeginIndex];
+ PackArgs = FlatArgs.data()+PackBeginIndex;
where test/SemaTemplate/variadic-class-template-2.cpp is accessing the vector
out of range and NumPackArgs is negative. I assume variadic template args are
completely hosed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104194 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
0 files changed, 0 insertions, 0 deletions