blob: 0c826e4b20d12b0a4ccedebcdaad92e3de5cac6f [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -emit-llvm %s -o %t
Douglas Gregord7f37bf2009-06-22 23:06:13 +00002
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) {
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000014 // RUN: grep "linkonce_odr.*_ZN1XIiE1fEi" %t | count 1
Douglas Gregord7f37bf2009-06-22 23:06:13 +000015 xi.f(i);
16
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000017 // RUN: grep "linkonce_odr.*_ZN1XIiE1gEi" %t | count 1
Douglas Gregord7f37bf2009-06-22 23:06:13 +000018 xi.g(f);
19
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000020 // RUN: grep "linkonce_odr.*_ZN1XIfE1fEf" %t | count 1
Douglas Gregord7f37bf2009-06-22 23:06:13 +000021 xfp->f(f);
22
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000023 // RUN: grep "linkonce_odr.*_ZN1XIfE1hEf" %t | count 0
Douglas Gregord7f37bf2009-06-22 23:06:13 +000024
Douglas Gregord7f37bf2009-06-22 23:06:13 +000025}
26
27
28