[llvm] [NFC][CodingStandard] Add additional example for if-else brace rule (PR #111733)
Owen Pan via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 11 23:22:30 PDT 2024
================
@@ -1713,6 +1713,14 @@ would help to avoid running into a "dangling else" situation.
handleOtherDecl(D);
}
+ // Use braces for the `else` block to keep it uniform with the `if` block.
+ if (isa<FunctionDecl>(D)) {
+ verifyFunctionDecl(D);
+ handleFunctionDecl(D);
+ } else {
----------------
owenca wrote:
I would add an `else if` single-statement block too.
https://github.com/llvm/llvm-project/pull/111733
More information about the llvm-commits
mailing list