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

Quentin Colombet qcolombet at apple.com
Fri Jul 26 09:18:04 PDT 2013


Hi,

On Jul 25, 2013, at 9:07 PM, Chris Lattner <clattner at apple.com> wrote:

> On Jul 25, 2013, at 6:04 PM, David Blaikie <dblaikie at gmail.com> wrote:
>>>> 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.
Sounds good!

>> 
>> Presumably there are diagnostics that are going to have more than one
>> parameter, though. ArrayRef<StringRef>? (though this doesn't scale to
>> providing fancy things like DIVariable parameters, that would possibly
>> allow Clang to lookup the variable (or function, etc) & print out
>> cursors, etc)
> 
> It's possible, but the full generality of any diagnostic can be folded (at some loss of generality) into a single string.  To balance complexity and generality vs simplicity, "1" is a pretty decent number.
Agreed.

Thanks for the help.

Cheers,

-Quentin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130726/ecbbff90/attachment.html>


More information about the llvm-dev mailing list