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 ad5b825 commit 8da82d3Copy full SHA for 8da82d3
lib/Parse/Lexer.cpp
@@ -2046,9 +2046,7 @@ bool Lexer::lexUnknown(bool EmitDiagnosticsIfToken) {
2046
2047
// This character isn't allowed in Swift source.
2048
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.
+ if (Codepoint == ~0U) {
2052
diagnose(CurPtr - 1, diag::lex_invalid_utf8)
2053
.fixItReplaceChars(getSourceLoc(CurPtr - 1), getSourceLoc(Tmp), " ");
2054
CurPtr = Tmp;
0 commit comments