summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaCXX/incomplete-call.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/incomplete-call.cpp b/clang/test/SemaCXX/incomplete-call.cpp
index 6f5169ee8aa..0fb1ef5f07a 100644
--- a/clang/test/SemaCXX/incomplete-call.cpp
+++ b/clang/test/SemaCXX/incomplete-call.cpp
@@ -48,6 +48,10 @@ void test_incomplete_object_call(C& c) {
c(); // expected-error{{incomplete type in call to object of type}}
}
+void test_incomplete_object_dtor(C *p) {
+ p.~C(); // expected-error{{member reference type 'C *' is a pointer; did you mean to use '->'?}}
+}
+
namespace pr18542 {
struct X {
int count;
OpenPOWER on IntegriCloud