[PATCH] D37090: Implement CFG construction for __finally.
Nico Weber via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 24 04:54:59 PDT 2017
I just realized that this doesn't do the right thing if the try body
contains jumps out of the try. That's rare and the CFG is mostly used for
warnings, but we should get that right anyhow I suppose. To fix this, I'd
probably add a "ActiveFinally" member, and when building a node for a
return, I'd make the return jump to that if it's active and then add an
edge to the exit node (or a containing finally) to the ActiveFinally. When
building jump nodes (continue, break, go-to) those would also go to the
ActiveFinally which in turn would go to the right place.
I don't think the code that's currently in this CL should change much so
you can look at that if you want, but I'll upload a revision with the above
mentioned changes eventually, so you can also wait for that.
On Aug 23, 2017 9:35 PM, "Nico Weber via Phabricator via cfe-commits" <
cfe-commits at lists.llvm.org> wrote:
> thakis created this revision.
> This completes CFG construction for SEH AST nodes.
> Also tweak test `g3` to explicitly check that `__leave` in an `__except`
> leaves the outer `__try`.
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits