summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/vector.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-09-10 14:57:06 +0000
committerDouglas Gregor <dgregor@apple.com>2012-09-10 14:57:06 +0000
commit0cb8939851364eb37a0f8bf8bb47874b7d966915 (patch)
treee857b33715e306abadf62c78125df92582270f70 /test/SemaCXX/vector.cpp
parent18857f7a1ff88469283b9e87384bdf5c8a274ca6 (diff)
Allow vector types in pseudo-destructor expressions. Fixes PR13798.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163514 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/vector.cpp')
-rw-r--r--test/SemaCXX/vector.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaCXX/vector.cpp b/test/SemaCXX/vector.cpp
index 82245ac29b..4d2d064b32 100644
--- a/test/SemaCXX/vector.cpp
+++ b/test/SemaCXX/vector.cpp
@@ -267,3 +267,14 @@ void test_mixed_vector_types(fltx4 f, intx4 n, flte4 g, flte4 m) {
(void)(n *= m);
(void)(n /= m);
}
+
+template<typename T> void test_pseudo_dtor_tmpl(T *ptr) {
+ ptr->~T();
+ (*ptr).~T();
+}
+
+void test_pseudo_dtor(fltx4 *f) {
+ f->~fltx4();
+ (*f).~fltx4();
+ test_pseudo_dtor_tmpl(f);
+}