Skip to content
  1. Feb 25, 2013
  2. Feb 24, 2013
  3. Feb 23, 2013
    • Daniel Jasper's avatar
      Better formatting of conditional expressions. · cd8599e8
      Daniel Jasper authored
      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
      cd8599e8
Loading