diff options
| author | Ed Schouten <ed@FreeBSD.org> | 2009-06-23 14:50:21 +0000 |
|---|---|---|
| committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-23 14:50:21 +0000 |
| commit | d6aff018d446f22be4e4e0277080ebfa5b157288 (patch) | |
| tree | 64b43af65e97f7659637c9ac028e39af2e26b841 /test/CodeGenCXX | |
| parent | b897c8660c4ff7037dde81b9645737bc1c992abe (diff) | |
Notes
Diffstat (limited to 'test/CodeGenCXX')
| -rw-r--r-- | test/CodeGenCXX/implicit-instantiation-1.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/CodeGenCXX/implicit-instantiation-1.cpp b/test/CodeGenCXX/implicit-instantiation-1.cpp new file mode 100644 index 000000000000..f6c6114d20c3 --- /dev/null +++ b/test/CodeGenCXX/implicit-instantiation-1.cpp @@ -0,0 +1,29 @@ +// RUN: clang-cc -emit-llvm %s -o %t && + +template<typename T> +struct X { + void f(T) { } + void f(char) { } + + void g(T) { } + + void h(T) { } +}; + +void foo(X<int> &xi, X<float> *xfp, int i, float f) { + // RUN: grep "linkonce_odr.*_ZN1XIiE1fEi" %t | count 1 && + xi.f(i); + + // RUN: grep "linkonce_odr.*_ZN1XIiE1gEi" %t | count 1 && + xi.g(f); + + // RUN: grep "linkonce_odr.*_ZN1XIfE1fEf" %t | count 1 && + xfp->f(f); + + // RUN: grep "linkonce_odr.*_ZN1XIfE1hEf" %t | count 0 && + + // RUN: true +} + + + |
