Richard Smith | 9ca5c42 | 2011-10-13 22:29:44 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s |
Alexis Hunt | e77a28f | 2011-05-18 03:41:58 +0000 | [diff] [blame] | 2 | |
3 | // WARNING: This test may recurse infinitely if failing. | ||||
4 | |||||
5 | struct foo; | ||||
6 | struct bar { | ||||
7 | bar(foo&); | ||||
8 | }; | ||||
9 | struct foo { | ||||
10 | bar b; | ||||
11 | foo() | ||||
Hans Wennborg | 61b2ffa | 2012-09-21 08:58:33 +0000 | [diff] [blame] | 12 | : b(b) // expected-warning{{field 'b' is uninitialized}} |
Alexis Hunt | e77a28f | 2011-05-18 03:41:58 +0000 | [diff] [blame] | 13 | {} |
14 | }; |