Using the code given in Adding a new Attribute or Type definition to define a custom attribute results in an error:
error: Using a raw APInt parameter without a custom comparator is not supported because an assert in the equality operator is triggered when the two APInts have different bit widths. This can lead to unexpected crashes. Use an `APIntParameter` or provide a custom comparator.
See #135970. We should update the document accordingly.