On 6/6/20 4:56 AM, Eric Botcazou wrote:
This patch fixes walk_tree_1 to call the function on the TYPE_DECL, as we do
for other decls of a DECL_EXPR.

Where is that done exactly?  The only case handled by DECL_EXPR is TYPE_DECL.

The only case handled specially is TYPE_DECL; other DECL_EXPRs fall through to the default case, where we WALK_SUBTREE over all the operands of the expression, which for DECL_EXPR is the decl.

I suppose it might be clearer to walk the decl for all DECL_EXPRs, then have the special TYPE_DECL handling, then break instead of falling through, though that doesn't get the tail recursion of the default case. Thoughts?

Jason

Reply via email to