We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02a323e commit ad5b825Copy full SHA for ad5b825
lib/Parse/Lexer.cpp
@@ -299,7 +299,7 @@ void Lexer::formToken(tok Kind, const char *TokStart) {
299
300
StringRef TokenText { TokStart, static_cast<size_t>(CurPtr - TokStart) };
301
302
- if (TriviaRetention == TriviaRetentionMode::WithTrivia) {
+ if (TriviaRetention == TriviaRetentionMode::WithTrivia && Kind != tok::eof) {
303
lexTrivia(TrailingTrivia, /* IsForTrailingTrivia */ true);
304
}
305
0 commit comments