-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Destructor usage is now properly registered #654
Conversation
Supported places of usage: - In delete expressions (for heap-allocated variables). - At the end of the parent scope (for stack-allocated local variables). - At the end of the destructor of enclosing record types (for member variables).
A new _statements stack now stores all parent statements of the currently visited statement.
@dbukki I am not sure which line you mean, line 947 seems to be unchanged in the GitHub diff viewer. Please mark the respective line with a comment in the PR. |
In my first commit, in VisitStmt there was a FIXME comment that we've also discussed during our last weekly meeting. It was about whether there is a better solution to retrieving the parent statement of a statement than using the parent map. In my second commit on this PR, I solved this by using a similar stack-based approach that we've already had examples for in the code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for being late with this and that @mcserep had to ping me extensively. I get like 1000 mails from GitHub every day thanks to llvm/llvm-project.
I think this is good to go with the changes applied.
Currently supported places of usage:
Fixes #306.
Only one question so far at line 947: is there a better solution than this?