summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-05-08 14:12:04 +0000
committerDaniel Jasper <djasper@google.com>2013-05-08 14:12:04 +0000
commit11e13801d8a25cea011c2a154380c371b6ddaaf6 (patch)
tree5ca7f813ecf6b62ae2e4cad24b76bad9ab8351bc /lib/CodeGen/CGExpr.cpp
parent3190ca922d3743137e15fe0c525c04b177b9983b (diff)
downloadclang-11e13801d8a25cea011c2a154380c371b6ddaaf6.tar.gz
clang-11e13801d8a25cea011c2a154380c371b6ddaaf6.tar.bz2
clang-11e13801d8a25cea011c2a154380c371b6ddaaf6.tar.xz
Improve line breaking in binary expressions.
If the LHS of a binary expression is broken, clang-format should also break after the operator as otherwise: - The RHS can be easy to miss - It can look as if clang-format doesn't understand operator precedence Before: bool aaaaaaaaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa != bbbbbbbbbbbbbbbbbb && ccccccccc == ddddddddddd; After: bool aaaaaaaaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa != bbbbbbbbbbbbbbbbbb && ccccccccc == ddddddddddd; As an additional note, clang-format would also be ok with the following formatting, it just has a higher penalty (IMO correctly so). bool aaaaaaaaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa != bbbbbbbbbbbbbbbbbb && ccccccccc == ddddddddddd; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181430 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
0 files changed, 0 insertions, 0 deletions