[cfe-dev] clang driver, how it does set the diagnostic depending on the

Sebastian Redl sebastian.redl at getdesigned.at
Mon Dec 15 05:53:43 PST 2008


On Mon, 15 Dec 2008 13:51:25 +0100, Paolo Bolzoni <bolzoni at cs.unipr.it>
wrote:
> dear cfe-dev,
> 
> how clang (as driver) does set the diagnostic levels depending on the
> language?
> 
> For example C89 sees BCPL's comments as an extension, C99 or C++ doesn't.
> 

It doesn't. Such language-specific diagnostics are usually made conditional
at the place that calls Diag().

However, the tokenizer has its own mechanism for having language-specific
keywords and tokens.

Sebastian



More information about the cfe-dev mailing list