Skip to content

Commit fa6c3df

Browse files
authored
[flang] Don't use \uXXXX encodings unless \-escapes are enabled (llvm#78326)
Don't put \uXXXX escapes into the cooked character stream while prescanning; it should always be UTF-8.
1 parent 1522333 commit fa6c3df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/include/flang/Parser/characters.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ void EmitQuotedChar(char32_t ch, const NORMAL &emit, const INSERTED &insert,
237237
}};
238238
if (ch <= 0x7f) {
239239
emitOneByte(ch);
240-
} else if (useHexadecimalEscapeSequences) {
240+
} else if (backslashEscapes && useHexadecimalEscapeSequences) {
241241
insert('\\');
242242
insert('u');
243243
if (ch > 0xffff) {

0 commit comments

Comments
 (0)