Add missing check for error return from DefaultLvalueConversion. Fixes <rdar://problem/12857416>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170056 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/new-delete.cpp b/test/SemaCXX/new-delete.cpp
index e77e3d6..8b35295 100644
--- a/test/SemaCXX/new-delete.cpp
+++ b/test/SemaCXX/new-delete.cpp
@@ -499,3 +499,14 @@
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;
+ }
+};