summaryrefslogtreecommitdiffstats
path: root/include/clang/Format/Format.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Format/Format.h')
-rw-r--r--include/clang/Format/Format.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/clang/Format/Format.h b/include/clang/Format/Format.h
index cb37b0c890..b9c4df3d1a 100644
--- a/include/clang/Format/Format.h
+++ b/include/clang/Format/Format.h
@@ -22,6 +22,8 @@
#include "llvm/Support/Regex.h"
#include <system_error>
+#define KEEP_LINE_BREAKS_FOR_NON_EMPTY_LINES_BACKPORTED
+
namespace llvm {
namespace vfs {
class FileSystem;
@@ -1200,6 +1202,16 @@ struct FormatStyle {
/// \endcode
bool JavaScriptWrapImports;
+ /// If true, no line breaks are optimized out (works only with ColumnLimit = 0)
+ /// \code
+ /// true: false:
+ /// int foo(int a, vs. int foo(int a, int b) {
+ /// int b) {
+ /// bar(); bar();
+ /// } }
+ /// \endcode
+ bool KeepLineBreaksForNonEmptyLines;
+
/// If true, the empty line at the start of blocks is kept.
/// \code
/// true: false:
@@ -1767,6 +1779,7 @@ struct FormatStyle {
JavaImportGroups == R.JavaImportGroups &&
JavaScriptQuotes == R.JavaScriptQuotes &&
JavaScriptWrapImports == R.JavaScriptWrapImports &&
+ KeepLineBreaksForNonEmptyLines == R.KeepLineBreaksForNonEmptyLines &&
KeepEmptyLinesAtTheStartOfBlocks ==
R.KeepEmptyLinesAtTheStartOfBlocks &&
MacroBlockBegin == R.MacroBlockBegin &&