We can't be sure that an array is too large without knowing how large
array elements are.
Details
Details
- Reviewers
rsmith
Diff Detail
Diff Detail
Event Timeline
Comment Actions
It's awkward to be rewriting chunks of Sema::BuildArrayType here. Would it be possible to factor out the "check for negative bound and array too large, and build a constant array type" part and use it in both places? The callers of TryToFixInvalidVariablyModifiedType all apparently want to diagnose those failure conditions in the same way (except that CheckVariableDeclarationType apparently chooses to ignore these bits and give a worse diagnostic instead.