summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2016-02-01 11:21:02 +0000
committerDaniel Jasper <djasper@google.com>2016-02-01 11:21:02 +0000
commite1a7b76338668c639e0611c97be4c3104224a507 (patch)
tree8031d35257edc588101d05aa9c59e6733d3bae54 /clang/lib/Format/Format.cpp
parentbb37a2f6f34f787c93c983a7cc1e7d9495c7e73b (diff)
downloadbcm5719-llvm-e1a7b76338668c639e0611c97be4c3104224a507.tar.gz
bcm5719-llvm-e1a7b76338668c639e0611c97be4c3104224a507.zip
clang-format: Add option to disable string literal formatting.
llvm-svn: 259352
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r--clang/lib/Format/Format.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 2689368da51..acd520ef546 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -275,6 +275,9 @@ template <> struct MappingTraits<FormatStyle> {
Style.BreakBeforeTernaryOperators);
IO.mapOptional("BreakConstructorInitializersBeforeComma",
Style.BreakConstructorInitializersBeforeComma);
+ IO.mapOptional("BreakAfterJavaFieldAnnotations",
+ Style.BreakAfterJavaFieldAnnotations);
+ IO.mapOptional("BreakStringLiterals", Style.BreakStringLiterals);
IO.mapOptional("ColumnLimit", Style.ColumnLimit);
IO.mapOptional("CommentPragmas", Style.CommentPragmas);
IO.mapOptional("ConstructorInitializerAllOnOneLineOrOnePerLine",
@@ -488,8 +491,9 @@ FormatStyle getLLVMStyle() {
LLVMStyle.BreakBeforeBraces = FormatStyle::BS_Attach;
LLVMStyle.BraceWrapping = {false, false, false, false, false, false,
false, false, false, false, false};
- LLVMStyle.BreakConstructorInitializersBeforeComma = false;
LLVMStyle.BreakAfterJavaFieldAnnotations = false;
+ LLVMStyle.BreakConstructorInitializersBeforeComma = false;
+ LLVMStyle.BreakStringLiterals = true;
LLVMStyle.ColumnLimit = 80;
LLVMStyle.CommentPragmas = "^ IWYU pragma:";
LLVMStyle.ConstructorInitializerAllOnOneLineOrOnePerLine = false;
OpenPOWER on IntegriCloud