flovent
5a8d096ae3
[clang-tidy] Fix false positive for cppcoreguidelines-pro-bounds-pointer-arithmetic ( #127394 )
...
this PR fixes #126424
for `ArraySubScriptExpr`, `hasBase` Matcher will get right operand when
it is not integer type, but is not for sure that left operand is integer
type. For the example code below `hasBase` will get `r` for the
Subsequent matching and causing false positive.
```
template <typename R>
int f(std::map<R*, int>& map, R* r) {
return map[r];
}
```
so is needed to see if index is integer type to avoid this situation.
2025-07-02 17:41:24 +03:00
..
2025-06-10 23:23:37 +03:00
2025-06-10 23:23:37 +03:00
2025-06-10 23:23:37 +03:00
2025-06-10 23:23:37 +03:00
2025-06-25 10:14:34 -07:00
2025-06-10 23:23:37 +03:00
2025-06-10 23:23:37 +03:00
2025-07-02 17:41:24 +03:00
2025-06-10 23:23:37 +03:00
2025-06-10 23:23:37 +03:00
2025-06-10 23:23:37 +03:00
2025-06-14 10:55:42 +03:00
2025-06-10 23:23:37 +03:00
2025-06-10 23:23:37 +03:00
2025-06-10 23:23:37 +03:00
2025-07-01 13:31:46 -07:00
2025-06-29 22:34:32 +03:00
2025-06-10 23:23:37 +03:00
2025-06-10 23:23:37 +03:00
2025-06-10 23:23:37 +03:00
2025-06-17 09:47:15 +01:00
2025-06-10 23:23:37 +03:00
2025-06-10 23:23:37 +03:00
2025-06-28 09:10:34 +03:00
2025-06-10 23:23:37 +03:00
2025-06-10 23:23:37 +03:00
2025-06-10 23:23:37 +03:00
2025-06-09 21:54:48 +03:00
2024-12-21 07:07:19 +08:00
2025-01-11 22:46:04 +08:00
2025-06-09 21:54:48 +03:00
2025-05-25 10:55:36 -07:00
2025-06-09 21:54:48 +03:00
2024-10-22 10:29:27 +03:00
2025-06-09 21:54:48 +03:00
2025-06-09 21:54:48 +03:00
2025-01-24 19:29:24 +08:00
2025-01-24 19:29:24 +08:00
2024-10-23 20:37:38 +04:00
2025-06-09 21:54:48 +03:00
2025-06-09 21:54:48 +03:00
2025-05-25 10:55:36 -07:00
2024-12-05 10:16:51 -05:00
2024-10-09 18:19:57 -04:00