Move the remaing of FIR types to TableGen type definition. This follow suggestion in D96422.
I'd prefer that the printers for these are defined with the parser. Can you move these to C++ as well?
Remove the extra newline here.
You don't need to define a parser/printer for types with no parameters.
Use the builders field instead: https://mlir.llvm.org/docs/OpDefinitions/#custom-type-builder-methods
Do the parsers/printers here have any test coverage?
You can use CArg to provided a default value for the map param.
Renaming the parameter to elementType would remove the need for this.
You should be able to do: isa<BoxType, BoxCharType, ...>()
This error message should be redundant, an error is already emitted for most of these cases. This seems to point to a lack of test coverage. We also try to avoid double error messages in general.
nit: You should be able to just stream this in: printer << ", " << map;
i = rows? The initialization here looks really weird,
Round trip tests in flang/test/Fir/fir-types.fir. I'm gonna upstream some "invalid" tests in a follow up patch as well to check the diagnostics.
It's not needed anymore so I just removed it.
Right. It's not new code so I didn't double checked it. Works fine with your suggestion. Thx!
It's also a code that was just moved around. I updated the initialization in the new patch version.