Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaCXX / base-class-ambiguity-check.cpp
blob0699349dabc4cc346dfdce37d0171240d65b0c89
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 template <typename T> class Foo {
4 struct Base : T {};
6 // Test that this code no longer causes a crash in Sema.
7 struct Derived : Base, T {};
8 };
11 template <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'}}
19 Foo2<int>::Derived a; // expected-note{{in instantiation of member class}}