[cfe-dev] Modify a Diagnostic in-flight?

Scott Douglas Constable via cfe-dev cfe-dev at lists.llvm.org
Mon Jul 17 11:27:44 PDT 2017


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170717/540ac3ba/attachment.html>


More information about the cfe-dev mailing list