Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/swift/Parse/SyntaxParsingContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ class alignas(1 << SyntaxAlignInBits) SyntaxParsingContext {
return SyntaxNode(std::move(rawNode));
}

ParsedTokenSyntax &&popToken();
ParsedTokenSyntax popToken();

/// Create a node using the tail of the collected parts. The number of parts
/// is automatically determined from \c Kind. Node: limited number of \c Kind
Expand Down
5 changes: 3 additions & 2 deletions lib/Parse/SyntaxParsingContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,9 @@ const SyntaxParsingContext *SyntaxParsingContext::getRoot() const {
return Curr;
}

ParsedTokenSyntax &&SyntaxParsingContext::popToken() {
return std::move(popIf<ParsedTokenSyntax>().getValue());
ParsedTokenSyntax SyntaxParsingContext::popToken() {
auto tok = popIf<ParsedTokenSyntax>();
return std::move(tok.getValue());
}

/// Add Token with Trivia to the parts.
Expand Down