================
@@ -11045,10 +11045,6 @@ bool RecordExprEvaluator::VisitCXXConstructExpr(const 
CXXConstructExpr *E,
 
   bool ZeroInit = E->requiresZeroInitialization();
   if (CheckTrivialDefaultConstructor(Info, E->getExprLoc(), FD, ZeroInit)) {
-    // If we've already performed zero-initialization, we're already done.
-    if (Result.hasValue())
----------------
efriedma-quic wrote:

When it's working correctly, it allows skipping work zero-initializing 
something that's already zero-initialized, I think.  But that assumes we 
maintain an invariant about exactly when values are absent, vs. uninitialized.  
We don't maintain that invariant for anonymous structs.  (We probably could, 
but it's a little tricky to implement correctly for nested anonymous structs.)

https://github.com/llvm/llvm-project/pull/154610
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to