[clang] [libcxx] [llvm] [Clang] Add warnings when mixing different charN_t types (PR #138708)

via cfe-commits cfe-commits at lists.llvm.org
Wed May 14 15:36:34 PDT 2025


================
@@ -484,7 +484,7 @@ template <class InternT, class ExternT>
 void utf8_to_utf16_in_ok(const std::codecvt<InternT, ExternT, mbstate_t>& cvt) {
   // UTF-8 string of 1-byte CP, 2-byte CP, 3-byte CP and 4-byte CP
   const unsigned char input[] = "b\u0448\uAAAA\U0010AAAA";
-  const char16_t expected[]   = {'b', 0x0448, 0xAAAA, 0xDBEA, 0xDEAA, 0};
+  const InternT expected[]    = {0x62, 0x0448, 0xAAAA, 0xDBEA, 0xDEAA, 0};
   static_assert(array_size(input) == 11, "");
   static_assert(array_size(expected) == 6, "");
 
----------------
cor3ntin wrote:

@dimztimz 

https://github.com/llvm/llvm-project/pull/138708


More information about the cfe-commits mailing list