[libc-commits] [libc] [libc] utf8 to 32 CharacterConverter (PR #143973)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Fri Jun 13 11:06:37 PDT 2025


================
@@ -48,9 +53,9 @@ int CharacterConverter::push(char8_t utf8_byte) {
   }
   // Any subsequent push
   // Adding 6 more bits so need to left shift
-  const int BITS_PER_UTF8 = 6;
+  const size_t BITS_PER_UTF8 = 6;
----------------
michaelrj-google wrote:

nit:
```suggestion
  constexpr size_t ENCODED_BITS_PER_UTF8 = 6;
```

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


More information about the libc-commits mailing list