For example, the above code:
void main() { // clang-format off #define Sum(x, y) ((x) + (y)) Sum(1, 2); #undef Sum // clang-format on }
If we run clang-format we will get the following result:
void main() { // clang-format off #define Sum(x, y) ((x) + (y)) Sum(1, 2); #undef Sum // clang-format on }
But if we run clang-format again, we will get another result:
void main() { // clang-format off #define Sum(x, y) ((x) + (y)) Sum(1, 2); #undef Sum // clang-format on }
I think the expectation should be "no mater how many times clang-format runs, the result should be the same."
This patch tries to fix this issue.