aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.cc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2024-10-03 16:31:00 -0400
committerJason Merrill <jason@redhat.com>2024-10-03 16:31:00 -0400
commitd77f073ce66cedbcbb22357c49b9ef19e1b61a43 (patch)
tree51bf367a73178f023a3c519c7b3f78fb42b3092b /gcc/cp/parser.cc
parent547219f41f049083cda55929ae1c900195993504 (diff)
downloadgcc-d77f073ce66cedbcbb22357c49b9ef19e1b61a43.zip
gcc-d77f073ce66cedbcbb22357c49b9ef19e1b61a43.tar.gz
gcc-d77f073ce66cedbcbb22357c49b9ef19e1b61a43.tar.bz2
c++: free garbage vec in coerce_template_parms
coerce_template_parms can create two different vecs for the inner template arguments, new_inner_args and (potentially) the result of expand_template_argument_pack. One or the other, or possibly both, end up being garbage: in the typical case, the expanded vec is garbage because it's only used as the source for convert_template_argument. In some dependent cases, the new vec is garbage because we decide to return the original args instead. In these cases, ggc_free the garbage vec to reduce the memory overhead of overload resolution. gcc/cp/ChangeLog: * pt.cc (coerce_template_parms): Free garbage vecs. Co-authored-by: Richard Biener <rguenther@suse.de>
Diffstat (limited to 'gcc/cp/parser.cc')
0 files changed, 0 insertions, 0 deletions