[clang] [llvm] [Clang] Reduce the number of ways we have to print a codepoint. (PR #206990)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 6 02:42:59 PDT 2026
================
@@ -19,12 +19,12 @@ void test(char8_t u8, char16_t u16, char32_t u32) {
c8(char32_t(0x7f));
- c8(char32_t(0x80)); // expected-warning {{implicit conversion from 'char32_t' to 'char8_t' changes the meaning of the code point '<U+0080>'}}
+ c8(char32_t(0x80)); // expected-warning {{implicit conversion from 'char32_t' to 'char8_t' changes the meaning of the code point U+0080}}
c8(char16_t(0x7f));
- c8(char16_t(0x80)); // expected-warning {{implicit conversion from 'char16_t' to 'char8_t' changes the meaning of the code point '<U+0080>'}}
- c8(char16_t(0xD800)); // expected-warning {{implicit conversion from 'char16_t' to 'char8_t' changes the meaning of the code unit '<0xD800>'}}
- c8(char16_t(0xE000)); // expected-warning {{implicit conversion from 'char16_t' to 'char8_t' changes the meaning of the code point '<U+E000>'}}
+ c8(char16_t(0x80)); // expected-warning {{implicit conversion from 'char16_t' to 'char8_t' changes the meaning of the code point U+0080}}
+ c8(char16_t(0xD800)); // expected-warning {{implicit conversion from 'char16_t' to 'char8_t' changes the meaning of the code unit <0xD800>}}
----------------
cor3ntin wrote:
Bunch of languages / hex editors etc do it. I don't know if it's conventional but it's certainly frequent.
Clang also does it in other places.
https://github.com/llvm/llvm-project/pull/206990
More information about the cfe-commits
mailing list