Modify a Diagnostic in-flight?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Modify a Diagnostic in-flight?

Sumner, Brian via cfe-dev

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

cfe-dev mailing list
[hidden email]