[libcxx-commits] [clang] [libcxx] [llvm] [Clang] Add warnings when mixing different charN_t types (PR #138708)
Tom Honermann via libcxx-commits
libcxx-commits at lists.llvm.org
Thu May 8 13:37:02 PDT 2025
================
@@ -4357,6 +4357,29 @@ def warn_address_of_reference_bool_conversion : Warning<
"code; pointer may be assumed to always convert to true">,
InGroup<UndefinedBoolConversion>;
+def warn_impcast_unicode_char_type
+ : Warning<"implicit conversion from %0 to %1 may change the meaning of the "
+ "represented code unit">,
+ InGroup<ImplicitUnicodeConversion>;
+def warn_impcast_unicode_precision
+ : Warning<"implicit conversion from %0 to %1 may lose precision and change "
+ "the meaning of the represented code unit">,
+ InGroup<ImplicitUnicodeConversion>;
+def warn_impcast_unicode_char_type_constant
+ : Warning<"implicit conversion from %0 to %1 changes the meaning of the "
+ "%select{code unit|codepoint}2 '%3'">,
----------------
tahonermann wrote:
```suggestion
def warn_impcast_unicode_char_type_constant
: Warning<"implicit conversion from %0 to %1 changes the meaning of the "
"%select{code unit|code point}2 '%3'">,
```
https://github.com/llvm/llvm-project/pull/138708
More information about the libcxx-commits
mailing list