Skip to content

Commit 714eee0

Browse files
authored
Merge pull request #60720 from DougGregor/attribute-eof-parser-loop
2 parents e14fefb + 28e1c30 commit 714eee0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

include/swift/Parse/Parser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ class Parser {
695695
tok::pound_else, tok::pound_elseif,
696696
tok::code_complete) &&
697697
!isStartOfStmt() &&
698-
!isStartOfSwiftDecl(/*allowPoundIfAttributes=*/false)) {
698+
!isStartOfSwiftDecl(/*allowPoundIfAttributes=*/true)) {
699699
skipSingle();
700700
}
701701
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// RUN: not %target-swift-frontend -parse %s
2+
@
3+
#if true
4+
print("x")
5+
#endif

0 commit comments

Comments
 (0)