blob: 614a041257552bd6e6b5a29d6bda16751c6bf0cc [file] [log] [blame]
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00001// RUN: clang-cc -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
25 // RUN: true
26}
27
28
29