aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/copy-ctor-assign.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-10-30 22:48:49 +0000
committerDouglas Gregor <dgregor@apple.com>2009-10-30 22:48:49 +0000
commit682054c52e8e7ebd7280e13d2cb26f8a9a17485a (patch)
treeebeba6f316ef76e97e698d0e1f77a48b5ceedb13 /test/SemaTemplate/copy-ctor-assign.cpp
parent259571e27e513cfaf691cc7447e09b31a47d5438 (diff)
When looking for a copy-assignment operator to determine the cv-qualifiers on its argument type, ignore assignment operator templates
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85629 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/copy-ctor-assign.cpp')
-rw-r--r--test/SemaTemplate/copy-ctor-assign.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/test/SemaTemplate/copy-ctor-assign.cpp b/test/SemaTemplate/copy-ctor-assign.cpp
index 90fb0133a7..69481ea557 100644
--- a/test/SemaTemplate/copy-ctor-assign.cpp
+++ b/test/SemaTemplate/copy-ctor-assign.cpp
@@ -33,4 +33,20 @@ void test3(X<int> &x, X<int> xi, X<long> xl, X<int Y::*> xmptr) {
x = xi;
x = xl;
x = xmptr; // expected-note{{instantiation}}
-} \ No newline at end of file
+}
+
+struct X1 {
+ X1 &operator=(const X1&);
+};
+
+template<typename T>
+struct X2 : X1 {
+ template<typename U> X2 &operator=(const U&);
+};
+
+struct X3 : X2<int> {
+};
+
+void test_X2(X3 &to, X3 from) {
+ to = from;
+}