checkedc / checkedc-fork

This was a fork of Checked C used from 2021-2024. The changes have been merged into the original Checked C repo.
Other
26 stars 3 forks source link

Get variable and constant: update tests #461

Closed secure-sw-dev-bot closed 2 years ago

secure-sw-dev-bot commented 2 years ago

This issue was copied from https://github.com/microsoft/checkedc/issues/463


This PR updates tests for checkedc-clang/1135. When the new method GetVariableAndConstant is used to compare two upper bounds expressions, the bounds checker is able to prove that the inferred bounds bounds(arr, arr + 5) are equivalent to the required cast bounds bounds((_Array_ptr<int _Checked[]>)&arr, (_Array_ptr<int _Checked[]>)&arr + 1))