Fix #14949: FP leakNoVarFunctionCall when passing resource to constructor - #8765
Fix #14949: FP leakNoVarFunctionCall when passing resource to constructor#8765aadanen wants to merge 4 commits into
Conversation
|
clang-tidy/build fails with sanitizers/build fails with a timeout. As I anticipated this solution is too slow. I will think about how to make it faster. |
It does that all the time, I'll rerun it later... |
| } | ||
| if (bail) | ||
| continue; | ||
| const Token* typeTok = arg->next(); |
There was a problem hiding this comment.
I'm not so sure typeTok is meaningful if it's not preceded by new. I believe in the test cases it's just a (. If we want to bail out here I think it's enough to determine that it's passed to a constructor.
Remove Variable and AllocType type checking when searching for unreleased arguments and when checking if member variables are deallocated in destructor.
This method is a little heavy handed and might hurt performance, but I am unsure how we could be more precise. It would be nice if we could check "If var.isResource() or var.needsToBeDeallocated()" but that would be a different PR i think.