[Docs] Clarify the guideline on omitting braces
While working on a clang-format option RemoveBracesLLVM that removes braces following the guideline, we were unsure about what to do with the braces of do-while loops. The ratio of using to omitting the braces is about 4:1 in the llvm-project source, so it will help to add an example to the guideline. Also cleans up the original examples including making the nested if example more targeted on avoiding potential dangling else situations. Differential Revision: https://reviews.llvm.org/D126512
Loading
Please sign in to comment