summaryrefslogtreecommitdiffstats
path: root/clang/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
commit6fe2f009df1a85efc588229676f2ffff0c1231f3 (patch)
tree097e47a8cdb8da8b25fef7e6a64d7e0979e43d3b /clang/lib/Format/Format.cpp
parenta04337e22b8b170a758011ddb78645a1d41be827 (diff)
downloadbcm5719-llvm-6fe2f009df1a85efc588229676f2ffff0c1231f3.tar.gz
bcm5719-llvm-6fe2f009df1a85efc588229676f2ffff0c1231f3.zip
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
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r--clang/lib/Format/Format.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index b483308a5a4..7d2041cd3c2 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud