A typical use case would be to allow custom attributes for pointer types. See examples/Attribute/Attribute.cpp for an example.
Unfortuantely, it is hard to provide meaningful test coverage for this change. The existing handleDeclAttribute() covered by lit tests for
attributes because multiple declaration attributes are marked 'SimpleHandler', which causes ClangAttrEmitter.cpp to generate a
handleDeclAttribute() handler for them. However, all of the existing type attributes need custom semantic handling, so it is not possible to simply implement them with 'SimpleHandler'.
The modified Attribute.cpp example does at least demonstrate that it is possible to use the new API without any build errors, but this is all that it does.