[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:45:29 PDT 2026
================
@@ -90,19 +90,19 @@ void test_comp(char8_t u8, char16_t u16, char32_t u32) {
(void)(char8_t(0x7f) == char32_t(0x7f));
(void)(char8_t(0x80) == char8_t(0x80));
- (void)(char8_t(0x80) == char16_t(0x80)); // expected-warning{{comparing values of different Unicode code unit types 'char8_t' and 'char16_t' compares unrelated code units '<0x80>' and '<U+0080>}}
- (void)(char8_t(0x80) == char32_t(0x80)); // expected-warning{{comparing values of different Unicode code unit types 'char8_t' and 'char32_t' compares unrelated code units '<0x80>' and '<U+0080>}}
+ (void)(char8_t(0x80) == char16_t(0x80)); // expected-warning{{comparing values of different Unicode code unit types 'char8_t' and 'char16_t' compares unrelated code units <0x80> and U+0080}}
----------------
cor3ntin wrote:
char8(0x80) is certainly a code unit - an invalid one at that - and `U+0080` is indeed a codepoint - and also a code unit - either way, they are unrelated things.
https://github.com/llvm/llvm-project/pull/206990
More information about the cfe-commits
mailing list