diff options
author | Jakub Jelinek <jakub@redhat.com> | 2020-11-03 21:42:51 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2020-11-03 21:42:51 +0100 |
commit | 875225301e356759982573d5578ed7ca54f81f86 (patch) | |
tree | 4badf3d271e09fccdd5859f8416b30e7af2a56f5 /gcc/omp-low.c | |
parent | 9f925f3b198e210e0d124a3c69fae034f429942f (diff) | |
download | gcc-875225301e356759982573d5578ed7ca54f81f86.zip gcc-875225301e356759982573d5578ed7ca54f81f86.tar.gz gcc-875225301e356759982573d5578ed7ca54f81f86.tar.bz2 |
c++: Don't try to parse a function declaration as deduction guide [PR97663]
While these function declarations have NULL decl_specifiers->type,
they have still type specifiers specified from which the default int
in the return type is added, so we shouldn't try to parse those as
deduction guides.
2020-11-03 Jakub Jelinek <jakub@redhat.com>
PR c++/97663
* parser.c (cp_parser_init_declarator): Don't try to parse
C++17 deduction guides if there are any type specifiers even when
type is NULL.
* g++.dg/cpp1z/class-deduction75.C: New test.
Diffstat (limited to 'gcc/omp-low.c')
0 files changed, 0 insertions, 0 deletions