[clang] [clang][bytecode] Don't implicitly begin union member lifetime... (PR #192212)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 15 05:11:24 PDT 2026


================
@@ -5609,6 +5610,8 @@ bool Compiler<Emitter>::VisitCallExpr(const CallExpr *E) {
     assert(Args.size() == 2);
     IsAssignmentOperatorCall = true;
     std::reverse(Args.begin(), Args.end());
+    const CXXRecordDecl *LHSRecord = Args[0]->getType()->getAsCXXRecordDecl();
+    ActivateLHS = !LHSRecord || LHSRecord->hasTrivialDefaultConstructor();
----------------
tbaederr wrote:

Yeah, I was just confused. `Args[0]` wasn't even the LHS here because it was after the `reverse()`.

https://github.com/llvm/llvm-project/pull/192212


More information about the cfe-commits mailing list