Skip to content

Commit 22eeac6

Browse files
authored
Merge pull request #62641 from DougGregor/parser-round-trip-cleanup
2 parents d1141d6 + 7d926a7 commit 22eeac6

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

include/swift/AST/DiagnosticsParse.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2014,9 +2014,9 @@ ERROR(macro_expansion_decl_expected_macro_identifier,none,
20142014
"expected a macro identifier for a pound literal declaration", ())
20152015

20162016
ERROR(parser_round_trip_error,none,
2017-
"source file did not round-trip through the Swift Swift parser", ())
2017+
"source file did not round-trip through the new Swift parser", ())
20182018
ERROR(parser_new_parser_errors,none,
2019-
"Swift Swift parser generated errors for code that C++ parser accepted",
2019+
"new Swift parser generated errors for code that C++ parser accepted",
20202020
())
20212021

20222022
#define UNDEFINE_DIAGNOSTIC_MACROS

lib/Parse/ParseDecl.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,7 @@ void Parser::parseTopLevelItems(SmallVectorImpl<ASTNode> &items) {
307307
// Perform round-trip and/or validation checking.
308308
if ((Context.LangOpts.hasFeature(Feature::ParserRoundTrip) ||
309309
Context.LangOpts.hasFeature(Feature::ParserValidation)) &&
310-
SF.exportedSourceFile &&
311-
!L->lexingCutOffOffset()) {
310+
SF.exportedSourceFile) {
312311
if (Context.LangOpts.hasFeature(Feature::ParserRoundTrip) &&
313312
swift_ASTGen_roundTripCheck(SF.exportedSourceFile)) {
314313
SourceLoc loc;

0 commit comments

Comments
 (0)