Anton Lindqvist 3d6c453058
Fix uninitvar false positive in designed initializers (#5079)
Stop interpreting struct fields in designed initializers as usage of local
variables which can happen if they share the same name.

```
$ cat test.c
struct a { int b; };
int main() {
  char *b;
  extern int foo(struct a *);
  return foo(&(struct a){.b = 0});
}
$ cppcheck --quiet test.c
test.c:5:27: error: Uninitialized variable: b [legacyUninitvar]
  return foo(&(struct a){.b = 0});
```
2023-05-26 11:59:10 +02:00
..
2023-05-22 19:53:51 +02:00
2023-01-28 10:16:34 +01:00
2022-08-28 14:22:12 +02:00
2023-01-28 10:16:34 +01:00
2023-01-28 10:16:34 +01:00
2023-01-28 10:16:34 +01:00