If a destructor is referenced or a pseudo-destructor expression is
formed without a trailing '(', diagnose the error (these expressions
must be immediately called), emit a fix-it hint, and fix the code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81015 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/pseudo-destructors.cpp b/test/SemaCXX/pseudo-destructors.cpp
index f1fa331..1f05e81 100644
--- a/test/SemaCXX/pseudo-destructors.cpp
+++ b/test/SemaCXX/pseudo-destructors.cpp
@@ -32,3 +32,9 @@
   
   f->::~Bar(17, 42); // expected-error{{cannot have any arguments}}
 }
+
+typedef int Integer;
+
+void destroy_without_call(int *ip) {
+  ip->~Integer; // expected-error{{called immediately}}
+}
\ No newline at end of file