Add option to align escaped newlines left.
This enables formattings like:
#define A \
int aaaa; \
int b; \
int ccc; \
int dddddddddd;
Enabling this for Google/Chromium styles only as I don't know whether it
is desired for Clang/LLVM.
llvm-svn: 180253
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index b483308..7d2041c 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -51,6 +51,7 @@
LLVMStyle.ObjCSpaceBeforeProtocolList = true;
LLVMStyle.PenaltyExcessCharacter = 1000000;
LLVMStyle.PenaltyReturnTypeOnItsOwnLine = 75;
+ LLVMStyle.AlignEscapedNewlinesLeft = false;
return LLVMStyle;
}
@@ -71,6 +72,7 @@
GoogleStyle.ObjCSpaceBeforeProtocolList = false;
GoogleStyle.PenaltyExcessCharacter = 1000000;
GoogleStyle.PenaltyReturnTypeOnItsOwnLine = 200;
+ GoogleStyle.AlignEscapedNewlinesLeft = true;
return GoogleStyle;
}