HighCommander4 wrote:

> What do you think about this as an alternative: if `spelledForExpanded` 
> receives as input an expanded token range `[firstExpanded, lastExpanded]` 
> where `lastExpanded` is the `eof` token, return the spelled tokens 
> corresponding to `[firstExpanded, lastExpanded - 1]` instead? (In the case 
> where the `eof` token is the only one in the range, we could return nullopt.)
> 
> This would have the advantage of gracefully handling AST nodes like this one 
> whose end location is the `eof`, and return all the spelled tokens actually 
> making up the node.

I wrote this up at https://github.com/llvm/llvm-project/pull/78092

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

Reply via email to