[clang] [libcxx] [llvm] [Clang] Add warnings when mixing different charN_t types (PR #138708)
via llvm-commits
llvm-commits at lists.llvm.org
Sat May 10 14:00:32 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'">,
+ InGroup<ImplicitUnicodeConversion>;
+
+def warn_comparison_unicode_mixed_types
+ : Warning<"comparing values of different Unicode code unit types %0 and %1 "
+ "may compare different codepoints">,
----------------
cor3ntin wrote:
Added the space - but "code point value" is a bit tautologic
https://github.com/llvm/llvm-project/pull/138708
More information about the llvm-commits
mailing list