// RUN: %clang_cc1 -fsyntax-only -verify %s // RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s template struct A {}; template struct B : A { B() : A() {} }; B x; template struct B1 : A { typedef A Base; B1() : Base() {} }; B1 x1; template struct Tmpl { }; template struct TmplB { }; struct TmplC : Tmpl { TmplC() : Tmpl(), TmplB() { } // expected-error {{type 'TmplB' is not a direct or virtual base of 'TmplC'}} }; struct TmplD : Tmpl, TmplB { TmplD(): Tmpl(), // expected-error {{type 'Tmpl' is not a direct or virtual base of 'TmplD'}} TmplB() {} }; namespace PR7259 { class Base { public: Base() {} }; template class Derived : public ParentClass { public: Derived() : Base() {} }; class Final : public Derived { }; int main (void) { Final final; return 0; } } namespace NonDependentError { struct Base { Base(int); }; // expected-note {{candidate constructor not viable}} // expected-note@-1 {{candidate constructor (the implicit copy constructor) not viable}} #if __cplusplus >= 201103L // C++11 or later // expected-note@-3 {{candidate constructor (the implicit move constructor) not viable}} #endif template struct Derived1 : Base { Derived1() : Base(1, 2) {} // expected-error {{no matching constructor}} }; template struct Derived2 : Base { Derived2() : BaseClass(1) {} // expected-error {{does not name a non-static data member or base}} }; Derived1 d1; Derived2 d2; }