-
-
Notifications
You must be signed in to change notification settings - Fork 38
ownership check failing! #407
Copy link
Copy link
Open
Description
This code reproduces the problem
#pragma safety enable
struct Y {
struct X* _Owner _Opt y;
};
void y_destroy([[dtor]] struct X* p)
{
//missing warning about p->s not released!
}
struct X {
char* _Owner _Opt s;
};flow analysis is running after y_destroy.
The problem is that the struct still incomplete.
Solution:
Run flow analysis at the end.
The consequence is that flow analysis warnings and parser warnings for the same function will be printed separately..
Unless parser warning were accumulated and only printed at the end.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels