[PATCH] D122529: [ASTMatchers] Output currently matching node on crash

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 31 12:28:28 PDT 2023


sammccall added a comment.
Herald added a subscriber: wangpc.

In D122529#3422158 <https://reviews.llvm.org/D122529#3422158>, @aaron.ballman wrote:

> This looks.... good?.... to me. :-)
>
> Despite this complicating things by a fair amount, I don't have a better suggestion to offer. LGTM

(sorry to turn up a year later, just want to see if I'm missing something)

AFAICT there's only ever one CurMatchData object.
In which case squeezing the union discriminator into the low bits saves... 8 bytes of stack over the whole AST traversal.

I ran into this when I tried to add a ninth pointer type. We could use a second bit of the callback, but seems like we can just store the discriminator in an int instead?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122529/new/

https://reviews.llvm.org/D122529



More information about the cfe-commits mailing list