From 51fb8b013e7734b795139f49d3b1f77c539be20a Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Wed, 4 Nov 2009 15:04:32 +0000 Subject: Update clang to r86025. --- test/SemaTemplate/default-expr-arguments.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'test/SemaTemplate/default-expr-arguments.cpp') diff --git a/test/SemaTemplate/default-expr-arguments.cpp b/test/SemaTemplate/default-expr-arguments.cpp index 575283ed8b51..9c0f1ecf0c3b 100644 --- a/test/SemaTemplate/default-expr-arguments.cpp +++ b/test/SemaTemplate/default-expr-arguments.cpp @@ -84,3 +84,27 @@ struct X1 { void test_X1() { X1 x1; } + +// PR5283 +namespace PR5283 { +template struct A { + A(T = 1); // expected-error 3 {{incompatible type initializing 'int', expected 'int *'}} +}; + +struct B : A { + B(); +}; +B::B() { } // expected-note {{in instantiation of default function argument expression for 'A' required he}} + +struct C : virtual A { + C(); +}; +C::C() { } // expected-note {{in instantiation of default function argument expression for 'A' required he}} + +struct D { + D(); + + A a; +}; +D::D() { } // expected-note {{in instantiation of default function argument expression for 'A' required he}} +} -- cgit v1.2.3