1*67e74705SXin Li // Test this without pch. 2*67e74705SXin Li // RUN: %clang_cc1 -include %s -std=c++11 -fsyntax-only -verify %s 3*67e74705SXin Li 4*67e74705SXin Li // Test with pch. 5*67e74705SXin Li // RUN: %clang_cc1 -x c++-header -std=c++11 -emit-pch -o %t %s 6*67e74705SXin Li // RUN: %clang_cc1 -std=c++11 -include-pch %t -fsyntax-only -verify %s 7*67e74705SXin Li 8*67e74705SXin Li #ifndef PASS1 9*67e74705SXin Li #define PASS1 10*67e74705SXin Li struct foo { foofoo11*67e74705SXin Li foo(int) : foo() { } 12*67e74705SXin Li foo(); foofoo13*67e74705SXin Li foo(bool) : foo('c') { } foofoo14*67e74705SXin Li foo(char) : foo(true) { } 15*67e74705SXin Li }; 16*67e74705SXin Li #else foo()17*67e74705SXin Lifoo::foo() : foo(1) { } // expected-error{{creates a delegation cycle}} \ 18*67e74705SXin Li // expected-note{{which delegates to}} 19*67e74705SXin Li 20*67e74705SXin Li // expected-note@11{{it delegates to}} 21*67e74705SXin Li // expected-note@13{{it delegates to}} 22*67e74705SXin Li // expected-error@14{{creates a delegation cycle}} 23*67e74705SXin Li // expected-note@14{{which delegates to}} 24*67e74705SXin Li #endif 25