Issue 163719
Summary -Wcharacter-conversion shouldn't warn about char16_t -> char32_t conversions
Labels new issue
Assignees
Reporter marcmutz
    Clang 21 was released with issue #138526 implementing a warning for the harmless char16_t -> char32_t conversion. This warning is pushing projects that want to use C++ character types for characters back into C++98 mode. While ICU isn't as affected, since they historically use their own typedefs for character types, Qt has just gone through a sweep where we replaced out ushort and uints used as character types with char16_t and char32_t. And this warning is causing reverts: https://codereview.qt-project.org/c/qt/qtbase/+/683817

This warning is therefore actively hurting C++ projects that want to use modern C++. As welcome a char8_t -> char16_t -> char8_t warning would be, the char16_t -> char32_t warning causes the warning to be disabled.

Please also see the comments on  issue #138526 for why the conversion is safe.

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to