aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/Format.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r--lib/Format/Format.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index a6b9e2031d..445a4064b4 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -253,6 +253,12 @@ public:
// Start iterating at 1 as we have correctly formatted of Token #0 above.
while (State.NextToken != NULL) {
+ if (State.NextToken->Type == TT_ImplicitStringLiteral)
+ // We will not touch the rest of the white space in this
+ // \c UnwrappedLine. The returned value can also not matter, as we
+ // cannot continue an top-level implicit string literal on the next
+ // line.
+ return 0;
if (FitsOnALine) {
addTokenToState(false, false, State);
} else {
@@ -374,11 +380,6 @@ private:
assert(State.Stack.size());
unsigned ParenLevel = State.Stack.size() - 1;
- if (Current.Type == TT_ImplicitStringLiteral) {
- moveStateToNextToken(State);
- return;
- }
-
if (Newline) {
unsigned WhitespaceStartColumn = State.Column;
if (Current.is(tok::r_brace)) {