c++: Refactor lookup_and_check_tag
authorNathan Sidwell <nathan@acm.org>
Thu, 1 Oct 2020 12:05:06 +0000 (05:05 -0700)
committerNathan Sidwell <nathan@acm.org>
Thu, 1 Oct 2020 12:07:54 +0000 (05:07 -0700)
commit9bab2a0dc84e7c3e14cb44fcd6ac41df079baa0f
tree84b7c7fba6fbb7d9534e06c768d8574318618a69
parent026ca1121c2f4514494c10860ef3c49f18eccf9d
c++: Refactor lookup_and_check_tag

It turns out I'd already found lookup_and_check_tag's control flow
confusing, and had refactored it on the modules branch.  For instance,
it continually checks 'if (decl &&$ condition)' before finally getting
to 'else if (!decl)'.  why not just check !decl first and be done?
Well, it is done thusly.

gcc/cp/
* decl.c (lookup_and_check_tag): Refactor.
gcc/cp/decl.c