aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-04-25 08:56:26 +0000
committerDaniel Jasper <djasper@google.com>2013-04-25 08:56:26 +0000
commit2972d049637349bb82f52a27ad3337cf4ab769b4 (patch)
treed4dc0797bebb5d5fb4ae934f2fe4268c5784f257 /lib/Format/Format.cpp
parentf1ed9febdd4bc4746c2a9fdaa0700014900b1326 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180253 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r--lib/Format/Format.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index b483308a5a..7d2041cd3c 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -51,6 +51,7 @@ FormatStyle getLLVMStyle() {
LLVMStyle.ObjCSpaceBeforeProtocolList = true;
LLVMStyle.PenaltyExcessCharacter = 1000000;
LLVMStyle.PenaltyReturnTypeOnItsOwnLine = 75;
+ LLVMStyle.AlignEscapedNewlinesLeft = false;
return LLVMStyle;
}
@@ -71,6 +72,7 @@ FormatStyle getGoogleStyle() {
GoogleStyle.ObjCSpaceBeforeProtocolList = false;
GoogleStyle.PenaltyExcessCharacter = 1000000;
GoogleStyle.PenaltyReturnTypeOnItsOwnLine = 200;
+ GoogleStyle.AlignEscapedNewlinesLeft = true;
return GoogleStyle;
}