dingfei
12559064e0
[analyzer] Fix a few size-type inconsistency relating to DynamicExtent
...
Size-type inconsistency (signedness) causes confusion and even bugs.
For example when signed compared to unsigned the result might not
be expected. Summary of this commit:
Related APIs changes:
1. getDynamicExtent() returns signed version of extent;
2. Add getDynamicElementCountWithOffset() for offset version of element count;
3. getElementExtent() could be 0, add defensive checking for
getDynamicElementCount(), if element is of zero-length, try
ConstantArrayType::getSize() as element count;
Related checker changes:
1. ArrayBoundCheckerV2: add testcase for signed <-> unsigned comparison from
type-inconsistency results by getDynamicExtent()
2. ExprInspection: use more general API to report more results
Fixes https://github.com/llvm/llvm-project/issues/64920
Reviewed By: donat.nagy, steakhal
Differential Revision: https://reviews.llvm.org/D158499
2023-09-01 21:03:16 +08:00
..
2023-05-31 07:26:03 +02:00
2023-08-18 10:47:05 +02:00
2023-05-23 08:29:52 +02:00
2023-08-03 11:44:05 +02:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-05-23 08:29:52 +02:00
2023-03-04 02:01:45 +01:00
2023-05-23 08:29:52 +02:00
2023-08-18 10:47:05 +02:00
2023-08-18 10:47:05 +02:00
2023-09-01 21:03:16 +08:00
2023-08-28 12:13:42 -04:00
2023-07-19 09:01:41 +02:00
2023-08-18 10:47:05 +02:00
2023-08-18 10:47:05 +02:00
2023-08-18 10:47:05 +02:00
2023-08-18 10:47:05 +02:00
2023-08-18 10:47:05 +02:00
2023-08-18 10:47:05 +02:00
2023-08-28 12:13:42 -04:00
2023-05-31 14:43:16 +02:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-06-15 12:41:09 +05:30
2022-12-12 11:25:19 -08:00
2023-08-28 12:13:42 -04:00
2023-05-23 08:29:52 +02:00
2022-12-15 12:26:33 -08:00
2022-12-19 12:49:43 +01:00
2023-01-25 02:32:55 +05:30
2023-06-01 09:54:35 +02:00
2022-09-26 11:39:10 +02:00
2023-07-18 08:31:38 +02:00
2023-08-28 12:13:42 -04:00
2022-10-26 17:22:12 +02:00
2023-08-29 09:36:59 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-07-07 13:24:33 +02:00
2022-11-09 15:06:46 +01:00
2023-08-28 12:13:42 -04:00
2023-08-09 15:12:09 +02:00
2023-07-18 09:29:15 +02:00
2023-06-01 09:54:35 +02:00
2022-12-11 17:56:51 -06:00
2023-09-01 21:03:16 +08:00
2023-08-28 12:13:42 -04:00
2023-07-11 08:50:59 +02:00
2023-03-22 08:43:09 +01:00
2023-08-28 12:13:42 -04:00
2023-07-03 16:13:47 +08:00
2023-08-28 12:02:48 +02:00
2022-10-20 14:14:52 +02:00
2022-11-08 07:21:23 -05:00
2023-08-18 10:47:05 +02:00
2023-07-24 11:50:20 +02:00
2023-07-05 07:39:14 +02:00
2023-05-23 08:29:52 +02:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-01-12 10:42:57 +01:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-09-01 21:03:16 +08:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-05-25 09:50:56 -07:00
2023-08-30 12:34:23 +08:00
2023-08-28 12:13:42 -04:00
2022-10-26 17:22:12 +02:00
2022-10-26 17:22:12 +02:00
2022-10-26 17:22:12 +02:00
2022-10-26 17:22:12 +02:00
2022-10-03 15:42:38 +02:00
2023-08-28 12:13:42 -04:00
2023-07-18 07:03:32 +02:00
2022-10-12 14:46:32 +02:00
2023-07-18 07:03:32 +02:00
2023-06-08 16:48:24 +02:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-07-06 22:36:51 +08:00
2023-07-06 22:36:51 +08:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-21 17:17:02 +02:00
2022-10-26 17:22:12 +02:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-07-03 16:13:47 +08:00
2023-08-28 12:13:42 -04:00
2023-06-01 09:54:35 +02:00
2023-03-04 02:01:45 +01:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2022-11-23 15:52:11 +01:00
2023-05-16 15:38:55 +02:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2022-10-26 17:22:12 +02:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-01-26 17:26:05 +01:00
2023-07-19 09:01:41 +02:00
2023-08-29 22:57:30 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-07-18 09:29:15 +02:00
2023-06-01 09:54:35 +02:00
2023-06-01 09:54:35 +02:00
2023-07-19 09:58:14 +02:00
2023-06-01 09:54:35 +02:00
2023-06-01 09:54:35 +02:00
2023-08-18 10:47:05 +02:00
2023-06-06 11:51:33 +02:00
2023-06-01 09:54:35 +02:00
2023-06-01 09:54:35 +02:00
2023-06-01 09:54:35 +02:00
2023-06-01 09:54:35 +02:00
2023-07-18 09:29:15 +02:00
2023-06-01 09:54:35 +02:00
2023-06-01 09:54:35 +02:00
2023-08-07 10:45:09 +02:00
2023-06-01 09:54:35 +02:00
2023-06-01 09:54:35 +02:00
2023-06-01 09:54:35 +02:00
2023-06-01 09:54:35 +02:00
2023-06-01 09:54:35 +02:00
2023-06-01 09:54:35 +02:00
2023-07-18 09:29:15 +02:00
2023-06-01 09:54:35 +02:00
2023-06-30 10:29:49 +02:00
2023-06-01 09:54:35 +02:00
2023-07-18 09:29:15 +02:00
2023-06-06 11:51:33 +02:00
2023-06-06 11:51:33 +02:00
2022-11-23 15:52:11 +01:00
2022-12-04 15:57:24 -08:00
2022-10-03 15:42:38 +02:00
2023-08-18 10:47:05 +02:00
2023-02-17 11:37:02 +01:00
2023-04-26 12:43:36 +02:00
2023-08-26 14:41:05 +09:00
2023-04-26 12:43:36 +02:00
2023-08-17 17:55:48 +09:00
2022-10-13 08:41:31 +02:00
2023-08-28 12:13:42 -04:00
2022-10-19 16:06:32 +02:00
2023-08-28 12:13:42 -04:00
2023-02-16 17:58:35 -08:00
2023-08-28 12:13:42 -04:00
2022-10-26 17:22:12 +02:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-07-05 07:39:14 +02:00
2023-08-28 12:13:42 -04:00
2023-06-01 09:54:35 +02:00
2023-01-26 12:55:42 -06:00