================ @@ -12354,7 +12354,8 @@ def err_preserve_enum_value_not_const: Error< def err_bit_cast_non_trivially_copyable : Error< "__builtin_bit_cast %select{source|destination}0 type must be trivially copyable">; def err_bit_cast_type_size_mismatch : Error< - "__builtin_bit_cast source size does not equal destination size (%0 vs %1)">; + "__builtin_bit_cast source type %0 size (%1 %plural{1:byte|:bytes}1) " + "does not match destination type %2 size (%3 %plural{1:byte|:bytes}3)">; ---------------- AaronBallman wrote:
How about: `size of '__builtin_bit_cast' source type %0 does not match destination type %1 (%2 vs %3 bytes)` mostly because it's slightly more succinct? (Btw, we should fix the other diagnostics to also put single quotes around `__builtin_bit_cast` -- we generally put single quotes around syntactic constructs in diagnostic messages. That's an NFC change for another patch though.) https://github.com/llvm/llvm-project/pull/115940 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits