efriedma-quic wrote:

I see two possible ways to approach this, in general:

- Come up with a method that actually figures out the end of the token inside 
the macro, instead of bailing on macros.  I'm not sure we can provide a good 
location in edge cases involving token pasting, but we can probably do better 
that just immediately bailing on any macro.
- Add a variant of getLocForEndOfToken that lets you pass in a fallback 
location.  The method would return that instead of an invalid token.  Here, you 
can probably just use `Tok.getLocation()`.

I think we normally suppress fixits in macros anyway, so you don't need to 
worry about places that pass the result of getLocForEndOfToken to a fixit.

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

Reply via email to