summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX
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
commitc5c5734d19ab20a21c8c636005dd5fce5e0169f1 (patch)
tree3ae3564a7ad2c974cecd7c528aa72a2ca8bac39b /clang/test/SemaCXX
parent02f481c42fc45318db565c7a16e012e0c4106d86 (diff)
downloadbcm5719-llvm-c5c5734d19ab20a21c8c636005dd5fce5e0169f1.tar.gz
bcm5719-llvm-c5c5734d19ab20a21c8c636005dd5fce5e0169f1.zip
Allow vector types in pseudo-destructor expressions. Fixes PR13798.
llvm-svn: 163514
Diffstat (limited to 'clang/test/SemaCXX')
-rw-r--r--clang/test/SemaCXX/vector.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/vector.cpp b/clang/test/SemaCXX/vector.cpp
index 82245ac29bb..4d2d064b32f 100644
--- a/clang/test/SemaCXX/vector.cpp
+++ b/clang/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);
+}
OpenPOWER on IntegriCloud