init.c (build_new): Use cp_expr_loc_or_input_loc in two places.
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 2 Oct 2019 23:23:51 +0000 (23:23 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 2 Oct 2019 23:23:51 +0000 (23:23 +0000)
commitf5fc32e4a38cee21d1935fd04ad19726f76c06a9
tree095ec074070c367b73e2026a1792245507ffbfa1
parent775eaa4d83458393a34aa6197ff823b63d6078fd
init.c (build_new): Use cp_expr_loc_or_input_loc in two places.

/cp
2019-10-03  Paolo Carlini  <paolo.carlini@oracle.com>

* init.c (build_new): Use cp_expr_loc_or_input_loc in two places.
* name-lookup.c (do_pushdecl): Use DECL_SOURCE_LOCATION.
(push_class_level_binding_1): Likewise.
(set_decl_namespace): Likewise.

/testsuite
2019-10-03  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/diagnostic/integral-array-size-1.C: New.
* g++.dg/cpp0x/alias-decl-1.C: Test location(s) too.
* g++.dg/init/new43.C: Likewise.
* g++.dg/lookup/friend12.C: Likewise.
* g++.dg/lookup/pr79766.C: Likewise.
* g++.dg/lookup/pr84375.C: Likewise.
* g++.dg/other/new-size-type.C: Likewise.

From-SVN: r276496
gcc/cp/ChangeLog
gcc/cp/init.c
gcc/cp/name-lookup.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/alias-decl-1.C
gcc/testsuite/g++.dg/diagnostic/integral-array-size-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/init/new43.C
gcc/testsuite/g++.dg/lookup/friend12.C
gcc/testsuite/g++.dg/lookup/pr79766.C
gcc/testsuite/g++.dg/lookup/pr84375.C
gcc/testsuite/g++.dg/other/new-size-type.C