libSyntax: rename SyntaxParsingContext.setDiscard() to SyntaxParsingContext.setBackTracking(). NFC

This commit is contained in:
Xi Ge
2018-07-09 14:01:51 -07:00
parent 493136267c
commit fd6b5941dd
4 changed files with 7 additions and 6 deletions

View File

@@ -3546,7 +3546,7 @@ parseDeclTypeAlias(Parser::ParseDeclOptions Flags, DeclAttributes &Attributes) {
}
if (Flags.contains(PD_InProtocol) && !genericParams && !Tok.is(tok::equal)) {
TmpCtxt->setDiscard();
TmpCtxt->setBackTracking();
TmpCtxt.reset();
// If we're in a protocol and don't see an '=' this looks like leftover Swift 2
// code intending to be an associatedtype.
@@ -4134,7 +4134,7 @@ bool Parser::parseGetSetImpl(ParseDeclOptions Flags,
// that the diagnostics point to correct tokens.
if (BeginParserPosition.isValid()) {
backtrackToPosition(BeginParserPosition);
BacktrackCtxt->setDiscard();
BacktrackCtxt->setBackTracking();
BacktrackCtxt.reset();
Attributes = DeclAttributes();
}