[llvm] [RFC][Docs] Clarify brace omission for single-line bodies (PR #195985)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Sun May 17 20:08:47 PDT 2026


================
@@ -1694,31 +1694,40 @@ faraway places in the file to tell that the function is local:
     ...
   }
 
-Don't Use Braces on Simple Single-Statement Bodies of if/else/loop Statements
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Don't Use Braces on Simple Single-Line Bodies
----------------
shiltian wrote:

> I wonder if we should instead say 'trivial' bodies, or something like that?

This is a loose end, IMHO. It's not a quantitative measurement. How trivial is "trivial"? The whole point of this PR, as well as the RFC, is to close that loose end and use a quantitative measurement instead.

https://github.com/llvm/llvm-project/pull/195985


More information about the llvm-commits mailing list