On 5/20/19 6:08 PM, Marek Polacek wrote:
We ICE here because we are accessing call_args even though it's empty:
(gdb) p (*call_args).is_empty()
$5 = true
It's empty because the pack processed by tsubst_pack_expansion expanded into an
empty vector, so nothing got pushed onto call_args. So handle that, and also
handle pushing 'this' properly when call_args is empty.
Ah, the problem is that nargs is just wrong in the presence of pack
expansions; in this case it's too large, but it could also end up too
small. What we want is the length of call_args, not the number of args
before doing the expansions.
Jason