[PATCH] D139544: [clang][dataflow] Add support for structured bindings of tuple-like types.

Yitzhak Mandelbaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 8 12:28:02 PST 2022


ymandel added a comment.

Domján -- thanks for the detailed explanations -- this has been really helpful.

> After this the get<>() calls simply use this unnamed copy to initialize the elements from first to last, so everything seems to proceed in order in the CFG.

Agreed -- it definitely should appear before, but I think it would be good to appear _after_ as well. That is, I think there's a catch-22: the temporary's construction should appear before, but the binding decls, which use the synthetic variables, should appear after.

What do you think of duplicating it in the CFG, possibly with a new (statement) element kind (to mark it as a special)?  There are other workarounds that we could do on our end, but the duplication would avoid the need for such -- for us and any other clients.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139544



More information about the cfe-commits mailing list