Skip to content

Commit 8da82d3

Browse files
author
Jan Svoboda
committed
Revert Lexer UTF8 replacement char changes
1 parent ad5b825 commit 8da82d3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/Parse/Lexer.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2046,9 +2046,7 @@ bool Lexer::lexUnknown(bool EmitDiagnosticsIfToken) {
20462046

20472047
// This character isn't allowed in Swift source.
20482048
uint32_t Codepoint = validateUTF8CharacterAndAdvance(Tmp, BufferEnd);
2049-
// fixme: replace with `UNI_REPLACEMENT_CHAR`
2050-
if (Codepoint == ~0U || Codepoint == 0x0000FFFD) {
2051-
// Invalid UTF-8 character or replacement character.
2049+
if (Codepoint == ~0U) {
20522050
diagnose(CurPtr - 1, diag::lex_invalid_utf8)
20532051
.fixItReplaceChars(getSourceLoc(CurPtr - 1), getSourceLoc(Tmp), " ");
20542052
CurPtr = Tmp;

0 commit comments

Comments
 (0)