Skip to content

Commit 3bce15f

Browse files
authored
Merge pull request #17520 from graydon/rdar-41154797-multiline-pound-diagnostic-swift-4.2-branch
2 parents d66a682 + d69e916 commit 3bce15f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/Parse/ParseDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3211,7 +3211,7 @@ ParserResult<PoundDiagnosticDecl> Parser::parseDeclPoundDiagnostic() {
32113211
// Catch #warning(oops, forgot the quotes)
32123212
SourceLoc wordsStartLoc = Tok.getLoc();
32133213

3214-
while (!Tok.isAtStartOfLine() && Tok.isNot(tok::r_paren)) {
3214+
while (!Tok.isAtStartOfLine() && !Tok.isAny(tok::r_paren, tok::eof)) {
32153215
skipSingle();
32163216
}
32173217

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// RUN: not %target-typecheck-verify-swift
2+
3+
#error("""
4+

0 commit comments

Comments
 (0)