clang-format: Slightly change indentation rules in for loops.
There was already a TODO to double-check whether the extra indenation makes sense. A slightly different case reveals that it is actively harmful: for (int i = 0; i < aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || bbbbbbbbbbbbbbbbbbbb < ccccccccccccccc; ++i) { } Here (and it is probably not a totally infrequent case, it just works out that "i < " is four spaces and so the four space extra indentation makes the operator precedence confusing. So, this will now instead be formatted as: for (int i = 0; i < aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || bbbbbbbbbbbbbbbbbbbb < ccccccccccccccc; ++i) { } llvm-svn: 231461
Loading
Please sign in to comment