Not sure how to test this - adding it to c-index-test's PrintType will change *everything*, which doesn't seem like a great idea.
In terms of testing, I'd recommend adding -test-print-qualified-type and see if you can thread a qualified vs unqualified parameter through PrintType() and friends to try to share as much code as possible. You'll probably need new wrapper functions that calls PrintType with the correct argument value depending on which test is being run. WDYT?
Simplifying a bit and fixing up a naming convention nit.
This looks like the right direction to me, but there's quite a few whitespace and formatting NFC changes in the patch. If you don't mind splitting those changes out into their own commit, that would be appreciated (feel free to land those changes without review given that they're only changing whitespace and other formatting).
I'm not super familiar with c-index-test -- how certain are you that the client data will 1) be non-null, and 2) actually be a VisitorData pointer?
Re the whitespace - yeah that's me running clang-format on the whole function rather than just the lines I changed. I'll see if I can split those out.
This was just copy-pasted from another function. I'm as certain as I can be given that all the tests pass :\