mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Parser] Consistently use consumeIdentifier() for normal identifiers.
consumeIdentifier() provides the general way in which we consume an identifier token and fill in an Identifier. Use it consistently in the parser.
This commit is contained in:
@@ -297,8 +297,8 @@ ParserStatus Parser::parseGenericWhereClause(
|
||||
getLayoutConstraint(Context.getIdentifier(Tok.getText()), Context)
|
||||
->isKnownLayout()) {
|
||||
// Parse a layout constraint.
|
||||
auto LayoutName = Context.getIdentifier(Tok.getText());
|
||||
auto LayoutLoc = consumeToken();
|
||||
Identifier LayoutName;
|
||||
auto LayoutLoc = consumeIdentifier(&LayoutName);
|
||||
auto LayoutInfo = parseLayoutConstraint(LayoutName);
|
||||
if (!LayoutInfo->isKnownLayout()) {
|
||||
// There was a bug in the layout constraint.
|
||||
|
||||
Reference in New Issue
Block a user