[PATCH] D26943: [CodingStandards] Add style guide rule about "if" statements and loops.
Saleem Abdulrasool via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 21 15:31:15 PST 2016
compnerd added a comment.
Personally, I think I would prefer that we add braces only if one of the bodies of the code path requires it:
OK:
if (first)
if (second)
third();
!OK:
if (first)
if (second) {
third();
fourth();
}
OK:
if (first) {
if (second) {
third();
fourth();
}
}
https://reviews.llvm.org/D26943
More information about the llvm-commits
mailing list