These are mostly small changes to make the code a bit clearer and more
consistent. Summary of changes:
- add missing namespace qualifiers (that's the preference in Flang)
- replace const member methods with static methods (to avoid passing the *this pointer unnecessarily)
- rename currentObjTy (current object type) as cpnTy (component type) - the latter feels more fitting
- remove redundant return failure(); calls ( return mlir::emitError gives the same result)
- updated a few comments
nit: You could limit the scope of sz by initialising it in the init slot of the loop together with i (as you do further down). Won't make much difference in this case, but for the good habit.