[cfe-dev] Diagnostic Improvements
Chris Lattner
clattner at apple.com
Mon Nov 17 16:52:20 PST 2008
On Nov 17, 2008, at 1:55 PM, Ted Kremenek wrote:
> by passing a FunctionDecl*) in arbitrary ways. For example, one can
> imagine that the HTML diagnostics engine (used by the static
> analyzer, but also usable for regular diagnostics) would add
> hyperlinks from function names to their definition. In a similar
> way IDEs could leverage
That would be cool.
>> because FormatDiagnostic would be given the QualType, so it could do
>> any crazy AST-level groveling that it wants to format it based on
>> what
>> the DiagClient implementation wants. This also is a big step to
>> solving #3, because it would mean that we could write things like:
>>
>> DIAG(err_operator_overload_must_be_binary, ERROR,
>> "overloaded '%0' must be a binary operator (has %u1 parameter
>> %up1)")
>
> I think that in the end we should probably go farther than this and
> not have any English text in the character string passed to DIAG
Yes, I agree. We already aim to avoid this.
> since we have to think about localization from the get-go instead of
> retrofitting it in. This of course is problematic for custom
> diagnostics.
At this point, I'm not too worried about custom diags. They are
basically an escape hatch. Lets solve the simple case first :)
-Chris
More information about the cfe-dev
mailing list