I think it is true for functions. But if the result is ambiguous,
you
can look at the first element to see if it's from class scope.
I see, that's good to know. So something like this?
-- >8 --
Subject: [PATCH] c++: Fix ICE from op_unqualified_lookup [PR97582]
In this testcase, we'r
outer scope.
> > > >
> > > > D'oh, good point. But IIUC, even if we did return (and later inject at
> > > > instantiation time) namespace-scope declarations that were hidden by
> > > > class-scope declarations, wouldn't the lookup at inst
o see if it's from class scope.
I see, that's good to know. So something like this?
-- >8 --
Subject: [PATCH] c++: Fix ICE from op_unqualified_lookup [PR97582]
In this testcase, we're crashing because the lookup of operator+ from
within the generic lambda via lookup_name finds
; > to me that the end result might be the same, but I'm not sure.
>
> The injection happens in the function parameter binding level, so I'd expect
> it to be found before class bindings.
Oops, I didn't look at push_operator_bindings closely enough. Never
mind about that id
On 2/9/21 5:12 PM, Patrick Palka wrote:
On Tue, 2 Feb 2021, Jason Merrill wrote:
On 2/2/21 12:19 AM, Patrick Palka wrote:
In this testcase, we're crashing because the lookup of operator+ from
within the generic lambda via lookup_name finds multiple bindings
(namely C1::operator+ and C2::operat
On Tue, 2 Feb 2021, Jason Merrill wrote:
> On 2/2/21 12:19 AM, Patrick Palka wrote:
> > In this testcase, we're crashing because the lookup of operator+ from
> > within the generic lambda via lookup_name finds multiple bindings
> > (namely C1::operator+ and C2::operator+) and returns a TREE_LIST
>
On 2/2/21 12:19 AM, Patrick Palka wrote:
In this testcase, we're crashing because the lookup of operator+ from
within the generic lambda via lookup_name finds multiple bindings
(namely C1::operator+ and C2::operator+) and returns a TREE_LIST
thereof, something which maybe_save_operator_binding is
In this testcase, we're crashing because the lookup of operator+ from
within the generic lambda via lookup_name finds multiple bindings
(namely C1::operator+ and C2::operator+) and returns a TREE_LIST
thereof, something which maybe_save_operator_binding isn't prepared to
handle.
Since we already d