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:
Denis Vnukov
2015-01-28 18:32:49 +00:00
parent d9f28f65a4
commit 995e4429b8
2 changed files with 8 additions and 1 deletions

View File

@@ -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 {