c++: A couple of template instantiation cleanups
authorNathan Sidwell <nathan@acm.org>
Tue, 3 Nov 2020 16:39:47 +0000 (08:39 -0800)
committerNathan Sidwell <nathan@acm.org>
Tue, 3 Nov 2020 16:49:26 +0000 (08:49 -0800)
commit1c8b8efa5becb70e04216a60021b835387ffea4e
tree9db051ab6852eeebb12c5271cfea6b2ab63e3b9f
parent770ec066b8b5d70921dfab9fcd1bbb87abeb0dc5
c++: A couple of template instantiation cleanups

I noticed that we were handling lambda extra scope during template
instantiation in a different order to how we handle the non-template
case.  Reordered that for consistency.  Also some more RAII during
template instantiation.

gcc/cp/
* pt.c (tsubst_lambda_expr): Reorder extra-scope handling to match
the non-template case.
(instantiate_body): Move a couple of declarations to their
initializers.
gcc/cp/pt.c