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