Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaTemplate / dependent-base-member-init.cpp
bloba278e79f912333d7952bcc28aa399ab5f486c6d1
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
4 // PR4381
5 template<class T> struct X {};
6 template<typename T> struct Y : public X<T>::X { };
8 // PR4621
9 class A1 {
10 A1(int x) {}
12 template<class C> class B1 : public A1 {
13 B1(C x) : A1(x.x) {}
15 class A2 { A2(int x, int y); };
16 template <class C> class B2 {
17 A2 x;
18 B2(C x) : x(x.x, x.y) {}
20 template <class C> class B3 {
21 C x;
22 B3() : x(1,2) {}
25 // PR4627
26 template<typename _Container> class insert_iterator {
27 _Container* container;
28 insert_iterator(_Container& __x) : container(&__x) {}
31 // PR4763
32 template<typename T> struct s0 {};
33 template<typename T> struct s0_traits {};
34 template<typename T> struct s1 : s0<typename s0_traits<T>::t0> {
35 s1() {}
38 // PR6062
39 namespace PR6062 {
40 template <typename T>
41 class A : public T::type
43 A() : T::type()
47 template <typename U>
48 A(U const& init)
49 : T::type(init)
50 { }
52 template<typename U>
53 A(U& init) : U::other_type(init) { }
57 template<typename T, typename U>
58 struct X0 : T::template apply<U> {
59 X0(int i) : T::template apply<U>(i) { }
62 // PR7698
63 namespace PR7698 {
64 template<typename Type>
65 class A {
66 char mA[sizeof(Type *)];
67 A(): mA() {}