Index: llvm/docs/CodingStandards.rst =================================================================== --- llvm/docs/CodingStandards.rst +++ llvm/docs/CodingStandards.rst @@ -510,6 +510,13 @@ of indentation. Also, do not reindent a whole source file: it makes for incredible diffs that are absolutely worthless. +Omit braces for (and only for) one-line "if" and loop bodies +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If the body of an *if* statement or a loop is a single line, omit the curly +braces. If the *if* statement or loop is multiple lines long, do not omit the +braces. + Indent Code Consistently ^^^^^^^^^^^^^^^^^^^^^^^^