commit | 9f5e5dbcb31032fc729501805ed548d80abad115 | [log] [tgz] |
---|---|---|
author | Dominik Laskowski <domlaskowski@google.com> | Tue May 25 12:52:24 2021 -0700 |
committer | Dominik Laskowski <domlaskowski@google.com> | Fri Jun 04 13:38:17 2021 -0700 |
tree | 865155d757a9187df0e39359a98cc1d38c15cb47 | |
parent | 776941460afa5d714a7f2c29866c35cdd75efb7c [diff] |
FTL: Add cast safety checker Add a function to check cast safety, to be used by a saturating cast that (among other uses) will replace ui::Size::clamp, which invokes the undefined behavior of signed overflow when casting INT32_MAX to float and back. Bug: 185536303 Test: ftl_test Change-Id: I412a1d72de7235b73ea3dd3f194d0da178ce5eb2