[PATCH] D120495: [clang][dataflow] Add transfer functions for structured bindings
Stanislav Gatev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 3 00:52:38 PDT 2022
sgatev added inline comments.
Herald added a project: All.
================
Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:80
+///
+/// FIXME: Consider adding support for structured bindings to the CFG builder.
+class DecompositionVisitor : public ConstStmtVisitor<DecompositionVisitor> {
----------------
xazax.hun wrote:
> Did you look into how hard would it be to add structured bindings to the CFG builder? If the effort is comparable to this patch (and not significantly bigger), it might be better to do that work instead of spending effort on some temporary workaround. What do you think?
Circling back to this after a while. I believe we explored changing the CFG briefly, but don't have a fully fleshed out proposal for it. I recently noticed https://discourse.llvm.org/t/implement-support-for-c-17-structured-bindings-in-the-clang-static-analyzer/60588. It seems that part of the project is exploring necessary changes to the CFG. What do you think about submitting this patch with local pattern matching and revisiting that once the GSoC project completes?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120495/new/
https://reviews.llvm.org/D120495
More information about the cfe-commits
mailing list