diff options
| author | Douglas Gregor <dgregor@apple.com> | 2009-06-26 21:40:05 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2009-06-26 21:40:05 +0000 |
| commit | febe45a727c8e54caaf7df8773b99726db184829 (patch) | |
| tree | bb82a36ae4ebbcbc525b9a696e8a1afcf741cb53 /clang/test | |
| parent | 01ad6605c0cf573216ecf5563877a2ef78b8cc78 (diff) | |
| download | bcm5719-llvm-febe45a727c8e54caaf7df8773b99726db184829.tar.gz bcm5719-llvm-febe45a727c8e54caaf7df8773b99726db184829.zip | |
A little template argument deduction test uncovered an "oops". As part
of template instantiation, we were dropping cv-qualifiers on the
instantiated type in a few places. This change reshuffles the
type-instantiation code a little bit so that there's a single place
where we add qualifiers to the instantiated type, so that we won't end
up with this same bug in the future.
llvm-svn: 74331
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p3.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p3.cpp b/clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p3.cpp index 18023523a9b..22166d1a7fc 100644 --- a/clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p3.cpp +++ b/clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p3.cpp @@ -30,6 +30,13 @@ void test_g0() { B<const int, 3> b1 = g0(array1); } +template<typename T> B<T, 0> g1(const A<T>&); + +void test_g1(A<float> af) { + B<float, 0> b0 = g1(af); + B<int, 0> b1 = g1(A<int>()); +} + // - If the original P is a reference type, the deduced A (i.e., the type // referred to by the reference) can be more cv-qualified than the // transformed A. |

