Closed
Description
This issue was copied from checkedc/checkedc-clang#1127
Fixes #1123
This PR allows pointer arithmetic expressions with unchecked pointer type to be invertible. This means that unchecked pointers with bounds-safe interfaces in unchecked scopes can have inverses.
For example:
void f(int *p : count(1)) _Unchecked {
p = p + 1;
}
In the body of f
, p
has the unchecked pointer type int *
since it is in an unchecked scope. Before this PR, p
would have no inverse in the expression p + 1
. After this PR, p
has the inverse p - 1
.
Metadata
Metadata
Assignees
Labels
No labels