diff options
author | Daniel Jasper <djasper@google.com> | 2014-10-27 16:31:46 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-10-27 16:31:46 +0000 |
commit | 56346193894e1afb3b4705fc9526933e11ed4aec (patch) | |
tree | f6f74cbb66ca02702ef513e941a1cd64d36b92cd /clang/lib/Format/Format.cpp | |
parent | 44ed3d04bfdec42f745c73a9a55f5c94886ac1c6 (diff) | |
download | bcm5719-llvm-56346193894e1afb3b4705fc9526933e11ed4aec.tar.gz bcm5719-llvm-56346193894e1afb3b4705fc9526933e11ed4aec.zip |
clang-format: Fix bad merging of lines in nested blocks.
Before:
SomeFunction([]() {
#define A a
return 43; });
After:
SomeFunction([]() {
#define A a
return 43;
});
llvm-svn: 220684
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r-- | clang/lib/Format/Format.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index b9d13ab691e..8960823488f 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -1277,6 +1277,9 @@ private: return true; } + if (Previous.Children[0]->First->MustBreakBefore) + return false; + // Cannot merge multiple statements into a single line. if (Previous.Children.size() > 1) return false; |