C++: Output destructors of temporary objects
I'd expect to see a destructor call for the temporary string at line 1369 of ir.cpp. The AST otherwise looks good to me.
I'd expect to see a destructor call for the temporary string at line 1369 of ir.cpp.
This turns out to be a very interesting case. It's a temporary, by the lifetime is at block scope, not expression scope.
very interesting case. It's a temporary, by the lifetime is at block scope, not expression scope.
This is now fixed.
This PR is now just test updates. All the other parts have been merged into main in separate PRs.
Closing in favour of https://github.com/github/codeql/pull/15978. That's the 3rd in a series of PRs, which mostly does what was done here, except for some synthetic destructor generation related to throws (that'll be a separate PR).