[cfe-dev] Warning options table
Chris Lattner
clattner at apple.com
Tue Mar 3 17:39:45 PST 2009
On Mar 2, 2009, at 11:11 PM, Sebastian Redl wrote:
>
> On Mon, 2 Mar 2009 14:16:31 -0800, Ted Kremenek <kremenek at apple.com>
> wrote:
>>
>> This looks very reasonable to me, although we might want to further
>> subclass into "SemaWarning" (subclassing Warning) and
>> "SemaError" (subclassing Error) so we can partition the warnings for
>> the individual libraries.
>>
>
> We don't want that, for two reasons.
> 1) Combinatorial explosion. It would give us (given the current .def
> files)
> 30 base classes to select from. This problem is easily solved,
> though, by
> making Sema etc. separate marker classes. Then you have
>
> def note_previous : Sema, Note<"previously occurred here">;
Right.
> 2) But more importantly, I simply think that separate files, the way
> we
> have them now, are the better choice. So we have a SemaDiag.td, a
> LexDiag.td, etc.
For that, it is probably best to just have:
let Library = "sema" in {
at the top of each per-library file, and } at the end.
-Chris
More information about the cfe-dev
mailing list