Debian Codegraph @

clang/test/SemaCXX/matrix-types-pseudo-destructor.cpp

raw
1 // RUN: %clang_cc1 -fsyntax-only -fenable-matrix -verify %s
2 // expected-no-diagnostics
3
4 template <typename T>
5 void f() {
6 T().~T();
7 }
8
9 template <typename T>
10 void f1(T *f) {
11 f->~T();
12 (*f).~T();
13 }
14
15 using mat4 = float __attribute__((matrix_type(4, 4)));
16 using mat4i = int __attribute__((matrix_type(4, 4)));
17
18 template <typename T>
19 using mat4_t = T __attribute__((matrix_type(4, 4)));
20
21 void g() {
22 f<mat4>();
23 f<mat4i>();
24 f<mat4_t<double>>();
25 }
26
27 void g2(mat4* m1, mat4i* m2, mat4_t<double>* m3) {
28 f1(m1);
29 f1(m2);
30 f1(m3);
31 }