Ken-Patrick Lehrmann
61ccf888b3
Fix some false positives when the same expression at different places does not have the same value
...
Typically with
```
int F(int *f);
void F2(int *a, int *b) {
int c = *a;
F(a); // modifies *a
if (b && c != *a) {}
}
```
we would get the following FP:
```
[test.cpp:3] -> [test.cpp:5]: (style) The comparison 'c != *a' is always false because 'c' and '*a' represent the same value.\n
```
I guess it boils down to isSameExpression only checking that the
expression is the same (in the above case, "*a" and "*a" are indeed the
same), but there's not real check on the values.
So the patch here is a bit hackish, and we still have false negatives in
cases with dereferenced pointers.
2020-07-11 14:13:18 +02:00
..
2020-05-23 07:16:49 +02:00
2020-06-13 16:37:12 +02:00
2020-07-03 17:54:55 +02:00
2020-06-29 21:53:14 +02:00
2020-06-28 22:49:51 +02:00
2020-06-19 13:16:48 +02:00
2020-06-13 16:37:12 +02:00
2019-03-16 09:17:50 +01:00
2020-05-23 07:16:49 +02:00
2020-05-23 07:16:49 +02:00
2020-05-23 07:16:49 +02:00
2019-09-20 21:57:16 +02:00
2020-05-31 10:10:10 +02:00
2020-05-23 07:16:49 +02:00
2020-06-27 08:13:22 +02:00
2020-06-27 08:13:22 +02:00
2020-06-13 16:37:12 +02:00
2019-03-16 09:17:50 +01:00
2020-05-23 07:16:49 +02:00
2020-05-10 11:16:32 +02:00
2020-06-29 13:09:01 +02:00
2020-06-17 20:35:43 +02:00
2020-07-01 07:48:32 +02:00
2020-05-23 07:16:49 +02:00
2020-06-22 12:26:41 +02:00
2020-05-23 07:16:49 +02:00
2020-06-18 14:49:19 +02:00
2020-06-13 16:37:12 +02:00
2020-05-23 07:16:49 +02:00
2020-05-10 11:16:32 +02:00
2020-05-10 11:16:32 +02:00
2020-06-13 16:37:12 +02:00
2020-07-08 00:02:39 +02:00
2020-06-13 16:37:12 +02:00
2020-07-07 21:51:36 +02:00
2020-05-23 07:16:49 +02:00
2020-05-23 07:16:49 +02:00
2020-06-13 16:37:12 +02:00
2020-07-11 14:13:18 +02:00
2020-06-30 18:26:24 +02:00
2020-06-13 16:37:12 +02:00
2019-03-16 09:17:50 +01:00
2020-06-13 16:37:12 +02:00
2019-03-16 09:17:50 +01:00
2020-07-10 19:24:45 +02:00
2020-07-10 19:24:45 +02:00
2020-06-13 16:37:12 +02:00
2019-04-06 06:54:38 +02:00
2020-06-13 16:37:12 +02:00
2019-08-05 12:41:08 +02:00
2020-06-28 21:01:43 +02:00
2020-05-23 07:16:49 +02:00
2020-05-23 07:16:49 +02:00
2019-09-27 08:19:45 +02:00
2020-06-30 11:00:40 +02:00
2020-05-10 11:16:32 +02:00
2020-05-23 07:16:49 +02:00
2019-09-20 21:57:16 +02:00
2020-05-19 08:35:12 +02:00
2020-01-10 16:29:06 +01:00
2020-06-24 18:41:16 -05:00
2020-06-29 15:54:51 -05:00
2020-06-30 11:00:40 +02:00
2020-05-30 11:23:22 +02:00
2018-07-09 08:27:26 +02:00
2020-06-20 09:47:35 +02:00
2020-05-29 12:16:04 +02:00
2020-05-23 07:16:49 +02:00
2020-06-13 16:37:12 +02:00
2020-05-23 07:16:49 +02:00
2020-05-23 07:16:49 +02:00
2020-05-23 07:30:22 +02:00
2020-05-23 07:16:49 +02:00
2020-06-29 21:53:14 +02:00
2020-06-28 17:28:40 +02:00
2020-06-14 10:06:54 +02:00
2020-05-10 16:45:45 +02:00
2020-06-27 12:57:09 +02:00
2020-06-26 17:12:02 +02:00
2020-06-19 13:16:48 +02:00
2020-06-28 21:01:43 +02:00
2020-06-28 21:01:43 +02:00
2020-05-23 07:16:49 +02:00
2019-02-09 07:24:06 +01:00
2019-09-25 15:25:19 +02:00
2019-02-09 07:24:06 +01:00
2020-05-19 08:35:12 +02:00
2020-05-23 07:16:49 +02:00
2018-10-13 18:20:31 +02:00
2018-10-13 18:20:31 +02:00
2019-09-19 20:29:33 +02:00
2020-05-10 11:16:32 +02:00
2020-05-29 12:16:04 +02:00
2020-05-23 07:16:49 +02:00
2020-06-30 11:00:40 +02:00
2020-05-19 08:53:38 +02:00
2020-05-23 07:16:49 +02:00
2020-06-24 20:30:03 +02:00
2020-06-24 20:30:03 +02:00
2019-09-25 15:25:19 +02:00
2020-05-10 11:16:32 +02:00
2020-05-10 11:16:32 +02:00
2020-07-07 21:51:36 +02:00
2020-05-31 10:10:10 +02:00
2020-06-29 15:13:06 -05:00
2019-12-16 18:11:12 +03:00
2019-11-20 15:37:09 +01:00
2019-11-20 15:37:09 +01:00
2020-06-26 09:50:18 +02:00
2020-05-26 20:13:56 +02:00
2020-06-30 18:26:24 +02:00
2020-06-30 18:26:24 +02:00
2020-06-22 08:34:31 +02:00
2020-05-19 13:47:25 +02:00
2020-05-19 08:35:12 +02:00
2020-05-19 08:53:38 +02:00
2020-06-30 08:28:08 +02:00
2020-05-31 10:10:10 +02:00
2020-05-10 11:16:32 +02:00
2020-06-14 07:16:14 +02:00