[cfe-dev] Warning options table

Ted Kremenek kremenek at apple.com
Tue Mar 3 17:53:38 PST 2009


On Mar 3, 2009, at 5:39 PM, Chris Lattner wrote:

>> 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.

Makes sense.

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

Does having separate per-library files pose issues with implementing - 
Wall?  That is, to implement -Wall, or any other option whose warnings  
might cross  several libraries, don't we need the ability to  
potentially know about all the warnings across Clang?  I think that  
was the original motivation to put all the warnings in one TableGen  
file.



More information about the cfe-dev mailing list