[PATCH] D23279: clang-reorder-fields

Kirill Bobyrev via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 9 10:37:12 PDT 2016


omtcyfz added a comment.

In https://reviews.llvm.org/D23279#510129, @alexshap wrote:

> Regarding TUs - i am aware of that - would be useful if you could provide a test which doesn't work - that would help us avoid miscommunication. Thanks.


Suppose you have a `struct Foo` defined in `LibA` and you reorder fields there; `LibA` is linked to `LibB` and you have `Foo foo = { &x, 17, 1.29, 0 };` in `LibB`. Your tool has only parsed `LibA` and therefore knows nothing of `struct Foo` usages in `LibB`. Thus, the struct constructions and everything related stays exactly the same in `LibB`.


Repository:
  rL LLVM

https://reviews.llvm.org/D23279





More information about the cfe-commits mailing list