[clang] [clang] Remove hasValue() check in `RecordExprEvaluator::VisitCXXConstructExpr()` (PR #154610)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 24 19:01:58 PDT 2025


================
@@ -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())
----------------
shafik wrote:

Was this code do nothing then? It looks like this check came in with e637cbe4e40ef 



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


More information about the cfe-commits mailing list