custom rendering of diagnostics


I would like to write a clang-based tool that renders diagnostics
in a custom way.

I figure that I need to write a custom DiagnosticConsumer, which
is fine, but I'm not sure what's the best way to set it all up.

I took a look at LibTooling, but I couldn't find a way to use a
custom DiagnosticConsumer when running a ClangTool. Do I need to
set up a CompilerInstance manually to do this?