Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CXX / temp / temp.decls / temp.class / temp.mem.class / p1.cpp
blobb65e1d0194b6932a95b7f1c0216914dd4c0d62c9
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 template<typename T, typename U>
4 struct X0 {
5 struct Inner;
6 };
8 template<typename T, typename U>
9 struct X0<T, U>::Inner {
10 T x;
11 U y;
13 void f() { x = y; } // expected-error{{incompatible}}
17 void test(int i, float f) {
18 X0<int, float>::Inner inner;
19 inner.x = 5;
20 inner.y = 3.4;
21 inner.f();
23 X0<int*, float *>::Inner inner2;
24 inner2.x = &i;
25 inner2.y = &f;
26 inner2.f(); // expected-note{{instantiation}}