c++: consistently diagnose bare CTAD placeholder in fn return type
authorPatrick Palka <ppalka@redhat.com>
Thu, 20 Jan 2022 14:22:27 +0000 (09:22 -0500)
committerPatrick Palka <ppalka@redhat.com>
Thu, 20 Jan 2022 14:22:27 +0000 (09:22 -0500)
commit2cda2bfa3fd0f2a0122433d2d870843633e2a312
tree261021dca91ceb2741f4aff2ab3e50271a7ceb8e
parentd63d9c3dd160dce24f0209f193b8e7388b19f712
c++: consistently diagnose bare CTAD placeholder in fn return type

Relax slightly the existing check for diagnosing a bare CTAD placeholder
as the return type of a function declarator to also handle the abstract
declarator case.

gcc/cp/ChangeLog:

* decl.cc (grokdeclarator): Diagnose a CTAD placeholder as
function return type even when !funcdecl_p.

gcc/testsuite/ChangeLog:

* g++.dg/other/pr88187.C: Adjust expected C++17 diagnostic.
gcc/cp/decl.cc
gcc/testsuite/g++.dg/other/pr88187.C