[PATCH] D26943: [CodingStandards] Add style guide rule about "if" statements and loops.

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 21 15:28:49 PST 2016


MatzeB added a comment.

In https://reviews.llvm.org/D26943#601946, @MatzeB wrote:

> And this example:
>
>   if (I.IsEven()) {
>     HandleEven(I);
>   } else {
>     HandleOdd(I):
>   }
>   
>
> to make it clear we want braces for `if else`.


Or rather:

  if (I.isEven()) {
    handleEven(I);
  } else {
    handleOdd(I):
  }

to be in line with function name conventions.


https://reviews.llvm.org/D26943





More information about the llvm-commits mailing list