brintos

brintos / llvm-project-archived public Read only

0
0
Text · 748 B · 0699349 Raw
20 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s2 3template <typename T> class Foo {4  struct Base : T {};5 6  // Test that this code no longer causes a crash in Sema.7  struct Derived : Base, T {};8};9 10 11template <typename T> struct Foo2 {12  struct Base1; // expected-note{{member is declared here}}13  struct Base2; // expected-note{{member is declared here}}14  // Should not crash on an incomplete-type and dependent base specifier.15  struct Derived : Base1, Base2 {}; // expected-error {{implicit instantiation of undefined member 'Foo2<int>::Base1'}} \16                                       expected-error {{implicit instantiation of undefined member 'Foo2<int>::Base2'}}17};18 19Foo2<int>::Derived a; // expected-note{{in instantiation of member class}}20