Skip to content

Commit 17140ed

Browse files
committed
ClangFormat: Insert braces & newline for Chromium
This addresses an old TODO in the Chromium codebase to upstream a change to the Chromium format style. https://source.chromium.org/chromium/chromium/src/+/main:.clang-format;l=10;drc=b9d8d6aeeef9feacf6eb4838cdccca4c2da2a0eb Bug: crbug.com/40247920
1 parent 9f8d798 commit 17140ed

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang/lib/Format/Format.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1892,6 +1892,9 @@ FormatStyle getChromiumStyle(FormatStyle::LanguageKind Language) {
18921892
ChromiumStyle.IncludeStyle.IncludeBlocks =
18931893
tooling::IncludeStyle::IBS_Preserve;
18941894

1895+
ChromiumStyle.InsertBraces = true;
1896+
ChromiumStyle.InsertNewlineAtEOF = true;
1897+
18951898
if (Language == FormatStyle::LK_Java) {
18961899
ChromiumStyle.AllowShortIfStatementsOnASingleLine =
18971900
FormatStyle::SIS_WithoutElse;

0 commit comments

Comments
 (0)