Modify a Diagnostic in-flight?

Hi All,

Is it possible to modify a Diagnostic in-flight? Or copy a diagnostic and then modify the copy? For example, I’m trying to write a DiagnosticConsumer which can add fix-it hints to diagnostics emitted by the Clang parser. So I’m hoping to have something like

MyDiagConsumer::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) {

Diagnostic NewDiag = addFixIt(Info);

MyTextDiagConsumer.HandleDiagnostic(DiagLevel, NewDiag);


Thanks in advance,

Scott Constable