I discovered this problem when playing around with slightly
different block split-ups when inserting temp dtors; a test
would fail with "garbage value accessed" warning. After following
some red herrings while debugging, I realized that the initializer
(MyClass c = ...) was after the temp destructor call (see the test
I had to fix). I just replaced the special-case logic in VisitIfStmt
with a call to addStmt, which invokes VisitDeclStmt, which already
handles all the temporary destructor logic correctly.
If you can come up with tests that this breaks, please let me know ;)
Details
Details
- Reviewers
krememek jordan_rose
Diff Detail
Diff Detail