[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:25:49 PDT 2025


================
@@ -34,6 +34,6 @@ int main(int, char**) {
   assert(from_next - from == 9);
   assert(to_next - to == 9);
   for (unsigned i = 0; i < 9; ++i)
-    assert(to[i] == from[i]);
+    assert(static_cast<char32_t>(to[i]) == static_cast<char32_t>(from[i]));
----------------
cor3ntin wrote:

I removed the redundant cast

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


More information about the cfe-commits mailing list