summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r--clang/lib/Format/Format.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 140bda21938..255f5142f07 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -1710,6 +1710,9 @@ private:
unsigned Limit) {
if (Limit == 0)
return;
+ if (Style.BreakBeforeBraces == FormatStyle::BS_Allman &&
+ (I + 1)->First->is(tok::l_brace))
+ return;
if ((I + 1)->InPPDirective != I->InPPDirective ||
((I + 1)->InPPDirective && (I + 1)->First->HasUnescapedNewline))
return;
OpenPOWER on IntegriCloud