If a state reset method is defined in a parent class, but called over an object of a child class, then the checker doesn't treat this as a state reset, at least for the sake of "Copying a 'moved-from' object" warning class.
The patch fixes it, but Peter may have a better fix in mind :)
I am wondering if I made a mistake but I think this should be removeFromState() function call. (We should remove every marked subregions of the object too.)
So I suspect a code like this would result a false positive:
struct A{ B b; void clear(); }; void test(){ A a; B b = std::move(a.b); a.clear(); b = std::move(a); //report a bug }I mean it is probably a report we do not want to have.