We somehow have 3 types of large IR structures, expressions, block items and declarations. If expression and block items is somewhat simple things, which follow rules, declaration is a thing in it's own which behave as block item, but do not have any lowering, even if they have tree structure. This simplifies declarations a bit, and remove nesting. Place multiple declarations into compound statement.
I'm not sure that this is last refactoring of this area, but at least this is gives idea of what should be done.
We somehow have 3 types of large IR structures, expressions, block items and declarations. If expression and block items is somewhat simple things, which follow rules, declaration is a thing in it's own which behave as block item, but do not have any lowering, even if they have tree structure. This simplifies declarations a bit, and remove nesting. Place multiple declarations into compound statement.
I'm not sure that this is last refactoring of this area, but at least this is gives idea of what should be done.