Richard Smith | 762bb9d | 2011-10-13 22:29:44 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s |
Sean Hunt | 71a682f | 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() | ||||
12 | : b(b) // expected-warning{{field is uninitialized}} | ||||
13 | {} | ||||
14 | }; |