From 56346193894e1afb3b4705fc9526933e11ed4aec Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Mon, 27 Oct 2014 16:31:46 +0000 Subject: 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 --- clang/lib/Format/Format.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/lib/Format/Format.cpp') 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; -- cgit v1.2.3