diff options
author | Joerg Sonnenberger <joerg@bec.de> | 2012-06-17 23:10:39 +0000 |
---|---|---|
committer | Joerg Sonnenberger <joerg@bec.de> | 2012-06-17 23:10:39 +0000 |
commit | 7e58ad5a6756f31b48a0d54d5f5c367328150a46 (patch) | |
tree | 4031dd2e2ac16ce3b24dfbe0ef714feade3b2ad6 /test/Sema/uninit-variables.c | |
parent | 28ba2ee5c5cc3e43ebf5f9d7464037689d82a198 (diff) |
Don't warn about address-to-member used as part of initialisation, if
the member expression is in parentheses.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158651 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/uninit-variables.c')
-rw-r--r-- | test/Sema/uninit-variables.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Sema/uninit-variables.c b/test/Sema/uninit-variables.c index 180d60cbce..59577b9585 100644 --- a/test/Sema/uninit-variables.c +++ b/test/Sema/uninit-variables.c @@ -438,6 +438,10 @@ void test54() { ASSIGN(int, c, d); // expected-warning {{variable 'c' is uninitialized when used here}} } +// Taking the address is fine +struct { struct { void *p; } a; } test55 = { { &test55.a }}; // no-warning +struct { struct { void *p; } a; } test56 = { { &(test56.a) }}; // no-warning + void uninit_in_loop() { int produce(void); void consume(int); |