aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.cc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2024-10-02 08:05:28 -0400
committerJason Merrill <jason@redhat.com>2024-10-03 12:33:53 -0400
commit5b08ae503dd4aef2789a667daaf1984e7cc94aaa (patch)
tree0623a6d88a839df7d72b7a014996af6bf8ca7eae /gcc/cp/parser.cc
parent8d63d87c6d45bf8feecdaf54b1743c94938ce7ff (diff)
downloadgcc-5b08ae503dd4aef2789a667daaf1984e7cc94aaa.zip
gcc-5b08ae503dd4aef2789a667daaf1984e7cc94aaa.tar.gz
gcc-5b08ae503dd4aef2789a667daaf1984e7cc94aaa.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 (struct free_if_changed_proxy): New. (coerce_template_parms): Use it. Co-authored-by: Richard Biener <rguenther@suse.de>
Diffstat (limited to 'gcc/cp/parser.cc')
0 files changed, 0 insertions, 0 deletions