[cfe-dev] Warning options table
Ted Kremenek
kremenek at apple.com
Mon Mar 2 14:18:59 PST 2009
On Mar 2, 2009, at 2:04 PM, Sebastian Redl wrote:
>> With a declarative way to define the different warning groups, we now
>> need a way to add the diagnostics to the different controlling sets.
>> This can be done by making 'Warn' and friends take an optional list
>> of
>> warning options they are in. This would give something like:
>>
>> def pp_macro_not_used : Warn<"macro is not used", [UnusedMacros]>;
>>
>> For hierarchical warning options, the WarningOption could just have a
>> list of things it includes (e.g. -Wall implies -Wunused-macros).
> That's inconsistent. Warnings declare what groups they are in, but
> groups declare what other things they include?
> Since we separate warnings from warning options completely, I think it
> would always be best for the options to declare what they enable. Then
> the diagnostic definition doesn't need to care at all about it. In
> fact,
> we could then put the whole options generation into a separate .td
> file,
> which appeals to me.
Hi Sebastian,
That's an interesting point. Can you give a (pseudocode) example of
what you mean?
More information about the cfe-dev
mailing list