diff options
author | Jason Merrill <jason@redhat.com> | 2024-12-23 19:56:43 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2025-01-08 16:35:43 -0500 |
commit | 325189c675017b73015aff250da14b68247b289f (patch) | |
tree | 19e85b97a01748c57232fca04a71c2079b93071d /gcc/gimplify.cc | |
parent | 72bb6fbbc56fe6a45058f4f6eac0ed6cc4f16473 (diff) | |
download | gcc-325189c675017b73015aff250da14b68247b289f.zip gcc-325189c675017b73015aff250da14b68247b289f.tar.gz gcc-325189c675017b73015aff250da14b68247b289f.tar.bz2 |
c++: add ref checks in conversion code
While looking at another patch I noticed that on a few tests we were doing
nonsensical things like building a reference to a reference. Make sure we
catch that sooner. But let's be friendly in can_convert, since it doesn't
return a conversion that could be wrongly applied to a reference.
gcc/cp/ChangeLog:
* call.cc (implicit_conversion): Check that FROM isn't a reference
if we also got an EXPR argument.
(convert_like_internal): Check that EXPR isn't a reference.
(can_convert_arg): convert_from_reference if needed.
Diffstat (limited to 'gcc/gimplify.cc')
0 files changed, 0 insertions, 0 deletions