[PATCH] D128113: WIP: Clang: fix AST representation of expanded template arguments.

Matheus Izvekov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 8 08:25:44 PDT 2022


mizvekov added a comment.

@davrec  @alexfh

I finally managed to have a talk to @rsmith about this.

He thinks that, even if we can't come up with a better solution in time, the benefits of this patch justify the costs observed, as those substitution nodes are pretty useless without a way to index the pack, and having a rich AST is one of Clang's main goals.

But he also came up with this nifty idea that this high cost is perhaps coming because we are reindexing the whole pack every time that repro recurses on that disjunction and we consume the first element in the deduction.
And that a good solution for this might be to just index the pack backwards, so that 0 is the last element.

I will try that sometime soon. Even if I don't see an improvement, any further objections we just re-merge this?

PS: That does not disregard the other ideas to further improve this in the future. Another thing he noted that would be important is to also be able to represent in the resulting AST a pack that expanded 0 times.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128113



More information about the cfe-commits mailing list