summaryrefslogtreecommitdiff
path: root/test/SemaCXX/deleted-function.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-02-24 21:44:43 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-02-24 21:44:43 +0000
commit777b9c4ae57fc5275d9c8481e6957104abd539c2 (patch)
treeb570dd0c688f931bc209e0d3fecbf34be6a93c0e /test/SemaCXX/deleted-function.cpp
parent81c841a0983db70bf169d4abb73cf5e52742146f (diff)
downloadclang-777b9c4ae57fc5275d9c8481e6957104abd539c2.tar.gz
PR22673 again: diagnose use of the used decl, not the found decl. This is also
wrong (DiagnoseUseOfDecl should take both), but it's more consistent with what we do in other places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230384 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/deleted-function.cpp')
-rw-r--r--test/SemaCXX/deleted-function.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/SemaCXX/deleted-function.cpp b/test/SemaCXX/deleted-function.cpp
index eab1f34692..bd6fc09eeb 100644
--- a/test/SemaCXX/deleted-function.cpp
+++ b/test/SemaCXX/deleted-function.cpp
@@ -87,3 +87,9 @@ int dc12 = use_dc({0}); // expected-error {{deleted}}
int use_dcr(const DelCtor &); // expected-note {{here}}
int dc13 = use_dcr(0); // expected-error {{deleted}}
int dc14 = use_dcr({0}); // expected-error {{deleted}}
+
+struct DelCtorTemplate {
+ template<typename T> DelCtorTemplate(T) = delete; // expected-note {{deleted}}
+};
+int use_dct(const DelCtorTemplate &);
+int dc15 = use_dct(0); // expected-error {{deleted}}