c++: simplify lookup_template_class_1
authorNathan Sidwell <nathan@acm.org>
Thu, 14 May 2020 14:20:35 +0000 (07:20 -0700)
committerNathan Sidwell <nathan@acm.org>
Thu, 14 May 2020 14:20:35 +0000 (07:20 -0700)
commitea5a33d4536ce2af90255782bda0ada632952205
tree4aba278f3d3a36bd48a5cc3f7a03382cc54343b9
parent5adbd0907563f494b602b9f38283d29c7b029bdf
c++: simplify lookup_template_class_1

We were checking TYPE_NAME and then copying it if not null.  Just copy
it, and then see if we got null.

* pt.c (lookup_template_class_1): Remove unnecessary else by
simply grabbing TYPE_NAME earlier.
gcc/cp/ChangeLog
gcc/cp/pt.c