[cfe-dev] Warning options table

Sebastian Redl sebastian.redl at getdesigned.at
Mon Mar 2 23:11:47 PST 2009


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">;

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.

Sebastian



More information about the cfe-dev mailing list