1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
3 // Inherit a valid non-default ctor.
4 namespace NonDefaultCtorValid {
24 // Inherit an invalid non-default ctor.
25 // The inherited ctor is invalid because it is unable to initialize s.
26 namespace NonDefaultCtorInvalid {
41 C() : b(0) {} // expected-error{{constructor inherited by 'B' from base class 'A' is implicitly deleted}}
42 // expected-note@-6{{constructor inherited by 'B' is implicitly deleted because field 's' has a deleted corresponding constructor}}
43 // expected-note@-15{{'S' has been explicitly marked deleted here}}
47 // Inherit a valid default ctor.
48 namespace DefaultCtorValid {
68 // Inherit an invalid default ctor.
69 // The inherited ctor is invalid because it is unable to initialize s.
70 namespace DefaultCtorInvalid {
85 C() {} // expected-error{{call to implicitly-deleted default constructor of 'struct B'}}
86 // expected-note@-6{{default constructor of 'B' is implicitly deleted because field 's' has a deleted default constructor}}
87 // expected-note@-15{{'S' has been explicitly marked deleted here}}