decl.c (smallest_type_location): New.
commit2212ae955a8a8cb759a65ca06c2e5462924ed66c
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 5 Jun 2019 20:07:01 +0000 (5 20:07 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 5 Jun 2019 20:07:01 +0000 (5 20:07 +0000)
tree242fe7b08d2034db678f20ae12a4e2e7037dcb42
parent0ecf545c6e542cc5eee78eac97d200b55e11001f
decl.c (smallest_type_location): New.

/cp
2019-06-05  Paolo Carlini  <paolo.carlini@oracle.com>

* decl.c (smallest_type_location): New.
(check_special_function_return_type): Use it.
(grokdeclarator): Lkewise.

/testsuite
2019-06-05  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/diagnostic/return-type-invalid-1.C: New.
* g++.old-deja/g++.brendan/crash16.C: Adjust.
* g++.old-deja/g++.law/ctors5.C: Likewise.

/cp
2019-06-05  Paolo Carlini  <paolo.carlini@oracle.com>

* decl.c (grokdeclarator): Use locations[ds_friend]
in one place.

/testsuite
2019-06-05  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/other/friend4.C: Test locations too.
* g++.dg/other/friend5.C: Likewise.
* g++.dg/other/friend7.C: Likewise.

From-SVN: r271974
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/diagnostic/return-type-invalid-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/other/friend4.C
gcc/testsuite/g++.dg/other/friend5.C
gcc/testsuite/g++.dg/other/friend7.C
gcc/testsuite/g++.old-deja/g++.brendan/crash16.C
gcc/testsuite/g++.old-deja/g++.law/ctors5.C