C++: PrintAST support for destructor calls #15270
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note: This should not be merged!
This is simply my attempt at adding destructor calls to PrintAST. This doesn't come for free because they don't have a proper parent / child relationship with the rest of the AST.
The first commit adds printing of destructors (along with a single test case). The next commit breaks everything by adding a test where the same destructor call is placed in two different places in the AST. This breaks the tree'ness of PrintAST, and causing the entire test file to change since it changes the structure from a tree to a graph 🙈.
cc @jketema I hope this is helpful!