jansvoboda11 wrote:

> But the list of tokens depends on things like what features are enabled, 
> right? e.g., `-fchar8_t` introduces a new keyword, while `_Atomic` isn't a 
> keyword in OpenCL, and `bool` is only a keyword in C23 and later but is 
> always a keyword in C++, etc. Ah, but in terms of dependency scanning, 
> whether those are keywords or not probably doesn't matter? And because we 
> expose things like `embed` as a keyword in all language modes, not just C23, 
> the language standard doesn't matter either?

I touched on this in 
https://github.com/llvm/llvm-project/pull/95798#discussion_r1852892503. We 
could represent these cases in the token list such that when the scanner feeds 
it to the `LanguageOptions`-aware preprocessor, it can still emit corresponding 
diagnostics.

https://github.com/llvm/llvm-project/pull/93753
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to