summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-02-23 21:01:55 +0000
committerDaniel Jasper <djasper@google.com>2013-02-23 21:01:55 +0000
commitcd8599e8c9774b83160ac1957e139838bf2bed64 (patch)
tree030dde3eaac937443c0a80e6dcea60affab06028 /clang/lib/CodeGen/CodeGenModule.cpp
parent3407211b2fbab2ca3e06955425854103b67dfdeb (diff)
downloadbcm5719-llvm-cd8599e8c9774b83160ac1957e139838bf2bed64.tar.gz
bcm5719-llvm-cd8599e8c9774b83160ac1957e139838bf2bed64.zip
Better formatting of conditional expressions.
In conditional expressions, if the condition is split over multiple lines, also break before both operands. This prevents formattings like: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa == aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? b : c; Which are bad, because they suggestion incorrect operator precedence: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa == (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? b : c); This lead to the discovery that the expression parser incorrectly handled conditional operators and that it could also handle semicolons (which in turn reduced the amount of special casing for for-loops). As a side-effect, we can now apply the bin-packing configuration to the sections of for-loops. llvm-svn: 175973
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud