Skip to content

Commit 298912a

Browse files
author
git apple-llvm automerger
committed
Merge commit '900ea21ffb38' from llvm.org/main into next
2 parents 1cab8a2 + 900ea21 commit 298912a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

llvm/docs/CodingStandards.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1713,6 +1713,14 @@ would help to avoid running into a "dangling else" situation.
17131713
handleOtherDecl(D);
17141714
}
17151715

1716+
// Use braces for the `else` block to keep it uniform with the `if` block.
1717+
if (isa<FunctionDecl>(D)) {
1718+
verifyFunctionDecl(D);
1719+
handleFunctionDecl(D);
1720+
} else {
1721+
handleOtherDecl(D);
1722+
}
1723+
17161724
// This should also omit braces. The `for` loop contains only a single
17171725
// statement, so it shouldn't have braces. The `if` also only contains a
17181726
// single simple statement (the `for` loop), so it also should omit braces.

0 commit comments

Comments
 (0)