[LLVMdev] [RFC] Add warning capabilities in LLVM.

Chris Lattner clattner at apple.com
Thu Jul 25 17:57:07 PDT 2013


On Jul 25, 2013, at 5:09 PM, Quentin Colombet <qcolombet at apple.com> wrote:

> Hi,
> 
> I think we have a consensus on how we should report diagnostics now.
> For broader uses, the discussion is still open.
> 
> To move forward on the diagnostic part, here is the plan:
> - Extend the current handler with a prototype like:
> void report(enum Kind, enum Classification, const char* msg)
> where
> - Kind is the kind of report: InlineAsm, StackSize, Other.
> - Classification is Error, Warning.
> - msg contains the fall back message to print in case the front-end do not know what to do with the report.
> 
> How does this sound?

Sounds like the right direction, how about extending it a bit more to be:


> void report(enum Kind, StringRef StringData, enum Classification, StringRef msg)

The idea is that "StringData+Kind" can be used to format something nice in clang, but that "msg" fully covers it for clients that don't know the Kind enum.

-Chris



More information about the llvm-dev mailing list