================
@@ -9739,6 +9761,20 @@ bool Sema::RequireCompleteTypeImpl(SourceLocation Loc, 
QualType T,
                               /*Recover*/ TreatAsComplete);
       return !TreatAsComplete;
     }
+
+    // The element type may have been incomplete when the array type was
+    // formed, in which case BuildArrayType could not check the array's size.
+    if (T->isConstantArrayType() && !T->isDependentType() &&
----------------
erichkeane wrote:

it seems to me that the function above you have for this could/should just give 
up if any of these conditions are true (as it already gives up if it isn't a 
constant array type).  That way you could combine the two 'if` statements.

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

Reply via email to