[LLVMdev] [RFC] Add warning capabilities in LLVM.
clattner at apple.com
Thu Jul 25 21:07:22 PDT 2013
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.
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev