aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/new-delete.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2013-04-08 18:45:10 +0000
committerDimitry Andric <dim@FreeBSD.org>2013-04-08 18:45:10 +0000
commit809500fc2c13c8173a16b052304d983864e4a1e1 (patch)
tree4fc2f184c499d106f29a386c452b49e5197bf63d /test/SemaCXX/new-delete.cpp
parentbe7c9ec198dcdb5bf73a35bfbb00b3333cb87909 (diff)
Notes
Diffstat (limited to 'test/SemaCXX/new-delete.cpp')
-rw-r--r--test/SemaCXX/new-delete.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaCXX/new-delete.cpp b/test/SemaCXX/new-delete.cpp
index e77e3d652f452..8b352954a3313 100644
--- a/test/SemaCXX/new-delete.cpp
+++ b/test/SemaCXX/new-delete.cpp
@@ -499,3 +499,14 @@ namespace PR12061 {
DeferredCookieTaskTest() {}
};
}
+
+class DeletingPlaceholder {
+ int* f() {
+ delete f; // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}}
+ return 0;
+ }
+ int* g(int, int) {
+ delete g; // expected-error {{reference to non-static member function must be called}}
+ return 0;
+ }
+};