|
df61fc7f
|
2024-11-14T13:31:24
|
|
Avoid reordering structs when separating from func
Avoid reordering structs when separating struct declarations
and function declarations.
Consider:
struct S1 { ... };
struct S2 { S1 a; } f();
SeparateStructFromFunctionDeclarations would insert the S2 to
the beginning of the containg block, so before S1 definition.
Fix by not inserting the structs to the parent block. Instead,
return the nodes from multi-replacement, so that the struct
definition is inserted at the site of the replaced function.
Bug: angleproject:378966971
Change-Id: I47582660610c1fcb28a9b5bd592ac020b5c48e34
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6022856
Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|