Use the TableGen directive back-end to generate code for the clauses unparsing.
LGTM. I have mentioned a few nits. You also have some clang-tidy warnings to fix.
BTW, the tests do not seem to be using the new fields introduced in this patch. Would it make sense to use them in the test?
bit valueIsList = 0; string defaultValue = "";
Nit: Should the name be isValueList to remain consistent with other boolean functions?
Nit: Was just checking whether this code can be improved.
Nit: as -> is