Clang Project

clang_source_code/test/SemaCXX/defaulted-ctor-loop.cpp
1// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
2
3// WARNING: This test may recurse infinitely if failing.
4
5struct foo;
6struct bar {
7  bar(foo&);
8};
9struct foo {
10  bar b;
11  foo()
12    : b(b) // expected-warning{{field 'b' is uninitialized}}
13  {}
14};
15