[cfe-dev] How to emit diagnostics?

Eli Friedman eli.friedman at gmail.com
Fri Jun 12 16:40:30 PDT 2009

On Fri, Jun 12, 2009 at 4:03 PM, AlisdairM(public)<public at alisdairm.net> wrote:
> I can see how the DiagnosticBuilder API works in other code, so I'm happy
> with the idea of re-using an existing "not supported" flag or creating a new
> one.  My problem is that I can't see how to hook a DiagnosticBuilder in the
> first place - there does not seem to be one available from within a member
> function of ContentCache and I'm not sure how else to obtain one.

You'll have mess with the relevant APIs (createFileID and friends, I
think).  You'll have to either pass down a reference to the
diagnostics from the caller, or add a reference parameter to pass back
error codes.


More information about the cfe-dev mailing list