[PATCH] D121756: [clang-format] Clean up code looking for if statements

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 22 02:36:34 PDT 2022


MyDeveloperDay added a comment.

> It turned out this patch does change behavior.

i.e. now your function is considering more things, the formatted code is different, do you think the new formatting is more correct? (I mean it feels like it should be right? assuming we want to consider whiles in the same way we consider if and for  (which seems fairly reasonable, i guess)

You have to capture that in the unit tests for sure, but also can you work out what it was not doing? what it that it wasn't considering the while? should it have?

This is kind of the problem about refactoring without a github issue to justify why you are making the changes in the first place. If you had/can find a bug saying "While loop doesn't format correctly" then it would be easier to justify.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121756/new/

https://reviews.llvm.org/D121756



More information about the cfe-commits mailing list