aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/operator-template.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-11-13 23:14:53 +0000
committerDouglas Gregor <dgregor@apple.com>2009-11-13 23:14:53 +0000
commitcad84b7c12564ff37feb66d6d004bb609bea8788 (patch)
treeafab19a2565e6069b475747c8b4946490d59d94a /test/SemaTemplate/operator-template.cpp
parent65d0e28583ac050ec9aa71b469285faad48d137e (diff)
A constructor template cannot be instantiated to a copy
constructor. Make sure that such declarations can never be formed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88718 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/operator-template.cpp')
-rw-r--r--test/SemaTemplate/operator-template.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/SemaTemplate/operator-template.cpp b/test/SemaTemplate/operator-template.cpp
index 7039e0ec83..af01a10042 100644
--- a/test/SemaTemplate/operator-template.cpp
+++ b/test/SemaTemplate/operator-template.cpp
@@ -11,6 +11,8 @@ int a0(A<int> x) { return x == 1; }
template<class X>struct B{typedef X Y;};
template<class X>bool operator==(B<X>*,typename B<X>::Y); // \
expected-error{{overloaded 'operator==' must have at least one parameter of class or enumeration type}} \
-expected-note{{in instantiation of member function}}
-int a(B<int> x) { return operator==(&x,1); }
+expected-note{{in instantiation of function template specialization}}
+int a(B<int> x) {
+ return operator==(&x,1); // expected-error{{no matching function}}
+}