Incorrect use of shared_ptr.
found by PVS-Studio https://pvs-studio.com/en/blog/posts/cpp/1003/, N8 & N9.
Differential D142309
[LLDB][NFC] Fix a incorrect use of shared_ptr in RenderScriptRuntime.cpp xgupta on Jan 22 2023, 8:58 AM. Authored by
Details Incorrect use of shared_ptr. found by PVS-Studio https://pvs-studio.com/en/blog/posts/cpp/1003/, N8 & N9.
Diff Detail
Event TimelineComment Actions I don't think this code is going to compile, is it? You took out the if (!buffer) { but left the RHS } so now the scopes are unbalanced. I think you should just change how the shared pointer is defined - which is presumably the substance of the patch - and leave everything after as is. Comment Actions LGTM, but I wonder when we'll be able to get rid of RenderScript completely (CC @labath) Comment Actions I am not going to stand in your way. I usually redirect these questions to @srhines, but I understand he's moved on to other things as well. Comment Actions RenderScript support can be removed. I don't necessarily have the bandwidth to do it immediately, but if someone wants to clean that up, I'd help with reviewing. |