Sirraide wrote:

> But the token kind we have is `identifier` and not one of the keywords, so we 
> can't do the more trivial integer comparisons.

Can we precompute a list/map/whatever of all identifiers that are keywords in 
C++ but not in C and then do pointer comparisons on the `IdentifierInfo*` 
maybe? At least then we wouldn’t have to do actual string comparisons; that 
said, I’m not sure that’s going to be that much better...

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

Reply via email to