summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-08-02 11:01:15 +0000
committerDaniel Jasper <djasper@google.com>2013-08-02 11:01:15 +0000
commit3dcd7eca7aa23beecfb59e0757e4c56ef8e6f149 (patch)
treeaac27a6d0a1bb6e51b94fbe3f609194ceee6751c /clang/lib/Format/Format.cpp
parent3194fca45fccafc8b9c97975e62afdde7f8c54cc (diff)
downloadbcm5719-llvm-3dcd7eca7aa23beecfb59e0757e4c56ef8e6f149.tar.gz
bcm5719-llvm-3dcd7eca7aa23beecfb59e0757e4c56ef8e6f149.zip
clang-format: Fix string breaking after "<<".
Before, clang-format would not break overly long string literals following a "<<" with FormatStyle::AlwaysBreakBeforeMultilineStrings being set. llvm-svn: 187650
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r--clang/lib/Format/Format.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index b2bf3fea98d..02cbc316c17 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -936,7 +936,7 @@ private:
State.NextToken = State.NextToken->Next;
if (!Newline && Style.AlwaysBreakBeforeMultilineStrings &&
- Current.is(tok::string_literal))
+ Current.is(tok::string_literal) && Current.CanBreakBefore)
return 0;
return breakProtrudingToken(Current, State, DryRun);
OpenPOWER on IntegriCloud