================
@@ -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();
----------------
Endilll wrote:
Shouldn't this be
```suggestion
ActivateLHS = LHSRecord && LHSRecord->hasTrivialDefaultConstructor();
```
If not, we need a test where `LHSRecord` is `nullptr`. I'm very curious how it
would look like and why we should accept it.
https://github.com/llvm/llvm-project/pull/192212
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits