This patch allows the refactoring library to use its own set of refactoring-specific diagnostics to reports things like initiation errors.
The code looks most good to me, a few nits.
just curious: is this change needed?
I'd name it "interface", because it has unimplemented virtual function (handleError), clients can't create an instance of it.
or alternatively, does it make more sense to just add these methods and DiagnosticsEngine variable to the tooling::RefactoringResultConsumer interface? I see you have replaced "RefactoringResultConsumer" with this new interface in many places.
- rename the common consumer class.
I get a build warning without this change as the bitfield becomes too narrow with the new category, so yeah.
Right now I don't think having the diagnostics engine will be useful for clients outside of tool, so I'd prefer to keep it here. We can reconsider this decision in the future if we need to.