From 6fe2f009df1a85efc588229676f2ffff0c1231f3 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Thu, 25 Apr 2013 08:56:26 +0000 Subject: 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 --- clang/lib/Format/Format.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/Format/Format.cpp') 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; } -- cgit v1.2.3