================
@@ -112,11 +112,13 @@ bool Context::evaluateAsInitializer(State &Parent, const 
VarDecl *VD,
 #endif
 
   // Ensure global variables are fully initialized.
-  if (shouldBeGloballyIndexed(VD) && !Res.isInvalid() &&
-      (VD->getType()->isRecordType() || VD->getType()->isArrayType())) {
+  if (shouldBeGloballyIndexed(VD) &&
+      (VD->getType()->isRecordType() || VD->getType()->isArrayType() ||
+       VD->getType()->isAnyComplexType())) {
     assert(Res.isLValue());
 
-    if (!Res.checkFullyInitialized(C.getState()))
+    if (!VD->getType()->isAnyComplexType() &&
+       !Res.checkFullyInitialized(C.getState()))
----------------
tbaederr wrote:

```suggestion
        !Res.checkFullyInitialized(C.getState()))
```

https://github.com/llvm/llvm-project/pull/79130
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to