blob: f6c6114d20c3c33d9debbafe9d68fabd408778c8 [file] [log] [blame]
Douglas Gregord7f37bf2009-06-22 23:06:13 +00001// RUN: clang-cc -emit-llvm %s -o %t &&
2
3template<typename T>
4struct X {
5 void f(T) { }
6 void f(char) { }
7
8 void g(T) { }
9
10 void h(T) { }
11};
12
13void foo(X<int> &xi, X<float> *xfp, int i, float f) {
14 // RUN: grep "linkonce_odr.*_ZN1XIiE1fEi" %t | count 1 &&
15 xi.f(i);
16
17 // RUN: grep "linkonce_odr.*_ZN1XIiE1gEi" %t | count 1 &&
18 xi.g(f);
19
20 // RUN: grep "linkonce_odr.*_ZN1XIfE1fEf" %t | count 1 &&
21 xfp->f(f);
22
23 // RUN: grep "linkonce_odr.*_ZN1XIfE1hEf" %t | count 0 &&
24
25 // RUN: true
26}
27
28
29