c++: Set more DECL_CONTEXTs
authorNathan Sidwell <nathan@acm.org>
Tue, 28 Jul 2020 15:57:36 +0000 (08:57 -0700)
committerNathan Sidwell <nathan@acm.org>
Tue, 28 Jul 2020 16:01:32 +0000 (09:01 -0700)
commitf3665bd1111c1799c0421490b5e655f977570354
tree57a656ea045c750c559b5af198cc0301b2275ad4
parent0cd58a9f091b39c5e41b7954d6c4bd88f3567d49
c++: Set more DECL_CONTEXTs

I discovered we were not setting DECL_CONTEXT in a few cases, and
grokfndecl's control flow wasn't making it clear that we were doing it
in all cases.

gcc/cp/
* cp-gimplify.c (cp_genericize_r): Set IMPORTED_DECL's context.
* cp-objcp-common.c (cp_pushdecl): Set decl's context.
* decl.c (grokfndecl): Make DECL_CONTEXT setting clearer.
gcc/cp/cp-gimplify.c
gcc/cp/cp-objcp-common.c
gcc/cp/decl.c