Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CXX / temp / temp.decls / temp.class / temp.mem.func / p1inst.cpp
blob9b570202b063581b02e856d1db7bb9774572d649
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // Test instantiation of member functions of class templates defined out-of-line
3 template<typename T, typename U>
4 struct X0 {
5 void f(T *t, const U &u);
6 void f(T *);
7 };
9 template<typename T, typename U>
10 void X0<T, U>::f(T *t, const U &u) {
11 *t = u; // expected-error{{indirection not permitted on operand of type 'void *'}} expected-error{{not assignable}}
14 void test_f(X0<float, int> xfi, X0<void, int> xvi, float *fp, void *vp, int i) {
15 xfi.f(fp, i);
16 xvi.f(vp, i); // expected-note{{instantiation}}