diff options
author | Patrick Palka <ppalka@redhat.com> | 2020-05-15 18:51:11 -0400 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-17 13:03:32 -0300 |
commit | 1f5d9aa6dfcf70fb3b0582db9ce0e0864fe699c1 (patch) | |
tree | 936cf8ce6ee011d3a4931e69f432d4d7ed416385 /gcc/tree-inline.c | |
parent | ef3111ed0ad2f5b15d09bbc7b09ef212997bda8d (diff) | |
download | gcc-1f5d9aa6dfcf70fb3b0582db9ce0e0864fe699c1.zip gcc-1f5d9aa6dfcf70fb3b0582db9ce0e0864fe699c1.tar.gz gcc-1f5d9aa6dfcf70fb3b0582db9ce0e0864fe699c1.tar.bz2 |
c++: decltype of invalid non-dependent expr [PR57943]
We sometimes fail to reject an invalid non-dependent operand to decltype
when inside a template, because finish_decltype_type resolves the
decltype to the TREE_TYPE of the operand before we ever instantiate and
fully process the operand. Fix this by adding a call to
instantiate_non_dependent_expr_sfinae in finish_decltype_type.
gcc/cp/ChangeLog:
PR c++/57943
* semantics.c (finish_decltype_type): Call
instantiate_non_dependent_expr_sfinae on the expression.
gcc/testsuite/ChangeLog:
PR c++/57943
* g++.dg/cpp0x/decltype76.C: New test.
Diffstat (limited to 'gcc/tree-inline.c')
0 files changed, 0 insertions, 0 deletions