c++: Simplify canonical_type_parameter
authorNathan Sidwell <nathan@acm.org>
Wed, 13 May 2020 20:11:36 +0000 (13:11 -0700)
committerNathan Sidwell <nathan@acm.org>
Wed, 13 May 2020 20:11:36 +0000 (13:11 -0700)
commit833c7b4b5ef071bc3c5c79108baff55f2bcaaac3
tree0c49b9f6880d5b7422120645c1d2dd8e307bfab0
parent7e6a72cb2eba764e88fa8df1ae8b75827281c92b
c++: Simplify canonical_type_parameter

Use a single vec_safe_grow_cleared, rather than that or a vec_alloc.
Use a for loop that returns early.

* pt.c (canonical_type_parameter): Simplify.
gcc/cp/ChangeLog
gcc/cp/pt.c