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-07-03 17:50:56 +02:00
2020-07-01 16:14:59 +02:00
2020-01-10 08:57:37 +01:00
2020-01-15 21:11:04 +01:00
2020-06-16 19:56:53 +02:00
2019-06-29 07:49:14 +02:00
2019-06-29 07:49:14 +02:00
2020-06-13 16:37:12 +02:00
2020-05-10 11:16:32 +02:00
2019-02-09 07:24:06 +01:00
2020-05-10 11:16:32 +02:00
2020-05-26 20:13:56 +02:00
2020-06-17 17:06:06 -05:00
2020-06-27 08:13:22 +02:00
2020-05-10 11:16:32 +02:00
2020-06-05 18:06:03 +02:00
2020-06-28 21:20:59 +02:00
2019-05-01 19:33:47 +02:00
2020-05-10 11:16:32 +02:00
2020-06-29 13:09:01 +02:00
2020-05-30 11:23:22 +02:00
2020-07-01 07:48:32 +02:00
2020-06-13 16:37:12 +02:00
2020-05-23 07:16:49 +02:00
2020-06-13 16:37:12 +02:00
2019-03-16 07:19:48 +01:00
2020-06-28 17:28:40 +02:00
2019-02-09 07:24:06 +01:00
2020-06-12 09:18:16 +02:00
2020-05-23 07:16:49 +02:00
2020-05-10 11:16:32 +02:00
2020-06-13 16:37:12 +02:00
2020-05-10 11:16:32 +02:00
2020-06-14 22:57:50 +02:00
2020-07-08 00:02:39 +02:00
2020-06-28 21:01:43 +02:00
2020-05-10 11:16:32 +02:00
2020-07-07 21:51:36 +02:00
2020-06-29 11:55:59 -05:00
2019-03-26 20:28:40 +01:00
2020-07-11 14:13:18 +02:00
2019-02-09 07:24:06 +01:00
2020-05-10 11:16:32 +02:00
2020-05-10 11:16:32 +02:00
2019-12-03 18:33:05 +01:00
2020-05-10 11:16:32 +02:00
2019-06-29 07:49:14 +02:00
2020-05-29 12:16:04 +02:00
2020-05-29 12:16:04 +02:00
2020-05-23 07:16:49 +02:00
2020-06-16 19:36:04 +02:00
2020-05-30 11:23:22 +02:00
2020-05-30 11:23:22 +02:00
2020-06-07 13:49:04 +02:00
2020-05-19 12:08:17 +02:00
2020-07-10 19:24:45 +02:00
2020-06-13 16:37:12 +02:00
2020-06-13 16:37:12 +02:00
2020-05-23 07:16:49 +02:00
2020-05-19 16:04:40 +02:00
2020-06-26 22:47:28 +02:00
2019-02-09 07:24:06 +01:00
2019-02-09 07:24:06 +01:00
2020-05-10 11:16:32 +02:00
2020-06-25 22:06:34 +02:00
2020-05-19 13:47:25 +02:00
2020-05-10 11:16:32 +02:00
2020-06-06 15:24:01 +02:00
2019-09-16 06:34:45 +02:00
2020-06-13 16:37:12 +02:00
2020-06-30 11:00:40 +02:00
2020-05-10 11:16:32 +02:00
2020-06-13 16:37:12 +02:00
2019-03-16 09:17:50 +01:00
2020-06-20 10:29:28 +02:00
2020-05-25 16:02:34 +02:00