On 5/20/26 12:38 PM, Marek Polacek wrote:
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk/16.2?

-- >8 --
This patch extends the 123700 fix to detect more cases:
a TYPENAME_TYPE with a LAMBDA_EXPR in it, and a DECLTYPE_TYPE
whose operand is a CALL_EXPR whose CALL_EXPR_FN is a LAMBDA_EXPR.

It still doesn't completely fix the problem: when the LAMBDA_EXPR
is more nested as e.g. in 110961:

using Typ = std::conditional_t<detail::ExtentsLike<Lst>, decltype([]<auto... 
Idx>(std::index_sequence<Idx...>){}(std::make_index_sequence<sizeof...(Ts)-1>{})), Tup>;

we won't find it since we don't and can't use walk_tree.  But this
patch is pretty simple and fixes (at least) 4 PRs.

Yes, but how long are we going to keep adding more special cases until we decide to fix the general problem? You already found another PR that isn't fixed by this new special case.

I assume the slowness problem is from rechecking every time we want to use the type; let's move toward setting a flag on the TYPE_DECL as the comment suggests.

Jason

Reply via email to