diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-05-26 20:50:29 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-05-26 20:50:29 +0000 |
commit | aba43bb13b3aa3e81990989375fba3a902bfe1c2 (patch) | |
tree | f0b11abaa42f4ef0c04da30b55b8663c0874bb4d /test/CodeGenCXX/explicit-instantiation.cpp | |
parent | ca308dfd9b2ded10458b95a980b0674896867ebb (diff) |
Make sure that CodeGen sees template instantiations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72433 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/explicit-instantiation.cpp')
-rw-r--r-- | test/CodeGenCXX/explicit-instantiation.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGenCXX/explicit-instantiation.cpp b/test/CodeGenCXX/explicit-instantiation.cpp new file mode 100644 index 0000000000..38966aad2d --- /dev/null +++ b/test/CodeGenCXX/explicit-instantiation.cpp @@ -0,0 +1,11 @@ +// RUN: clang-cc -emit-llvm -femit-all-decls -o %t %s && +// RUN: grep "_ZNK4plusIillEclERKiRKl" %t | count 1 + +template<typename T, typename U, typename Result> +struct plus { + Result operator()(const T& t, const U& u) const { + return t + u; + } +}; + +template struct plus<int, long, long>; |