================
@@ -3404,6 +3404,15 @@ void CastOperation::CheckBuiltinBitCast() {
return;
}
+ if (SrcExpr.get()->isGLValue() &&
----------------
efriedma-quic wrote:
It's worth stepping back to figure out what the goal is here.
If we want to emulate the set of casts that std::bit_cast would perform, we
probably don't want to list out special cases like this. Instead, we should
use the same codepath we use for actual arguments, PerformCopyInitialization().
That code already knows how to perform whatever conversions are necessary and
diagnose whatever issues come up.
https://github.com/llvm/llvm-project/pull/231830
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits