mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Fix for rdar://problem/19605880, Fuzzing Swift: crash in Verifier::walkToStmtPost(...): invalid IfConfigStmt end location
Proper braces locations for protocol in erroneous case. Swift SVN r24799
This commit is contained in:
@@ -4144,7 +4144,7 @@ parseDeclProtocol(ParseDeclOptions Flags, DeclAttributes &Attributes) {
|
||||
SourceLoc LBraceLoc;
|
||||
SourceLoc RBraceLoc;
|
||||
if (parseToken(tok::l_brace, LBraceLoc, diag::expected_lbrace_protocol)) {
|
||||
LBraceLoc = Tok.getLoc();
|
||||
LBraceLoc = PreviousLoc;
|
||||
RBraceLoc = LBraceLoc;
|
||||
Status.setIsParseError();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user