Skip to content

Commit 92fd649

Browse files
author
David Ungar
committed
Use CloseQuoteBegin
1 parent 7a8b3c8 commit 92fd649

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/Parse/ParseExpr.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2039,10 +2039,8 @@ ParserResult<Expr> Parser::parseExprStringLiteral() {
20392039
// Return an error, but include an empty InterpolatedStringLiteralExpr
20402040
// so that parseDeclPoundDiagnostic() can figure out why this string
20412041
// literal was bad.
2042-
return makeParserErrorResult(
2043-
new (Context) InterpolatedStringLiteralExpr(Loc,
2044-
EndLoc.getAdvancedLoc(-1),
2045-
0, 0, nullptr));
2042+
return makeParserErrorResult(new (Context) InterpolatedStringLiteralExpr(
2043+
Loc, Loc.getAdvancedLoc(CloseQuoteBegin), 0, 0, nullptr));
20462044
}
20472045

20482046
unsigned LiteralCapacity = 0;
@@ -2095,7 +2093,7 @@ ParserResult<Expr> Parser::parseExprStringLiteral() {
20952093
}
20962094

20972095
return makeParserResult(Status, new (Context) InterpolatedStringLiteralExpr(
2098-
Loc, EndLoc.getAdvancedLoc(-1),
2096+
Loc, Loc.getAdvancedLoc(CloseQuoteBegin),
20992097
LiteralCapacity, InterpolationCount,
21002098
AppendingExpr));
21012099
}

0 commit comments

Comments
 (0)