-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[Clang] [Sema] Support matrix types in pseudo-destructor expressions #117483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// RUN: %clang_cc1 -fsyntax-only -fenable-matrix -verify %s | ||
// expected-no-diagnostics | ||
|
||
template <typename T> | ||
void f() { | ||
T().~T(); | ||
} | ||
Sirraide marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
template <typename T> | ||
void f1(T *f) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we have a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably a good idea There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, it turns out we currently don’t support matrix types in constant expressions, so, er, I’ll open a separate issue about that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
f->~T(); | ||
(*f).~T(); | ||
} | ||
|
||
using mat4 = float __attribute__((matrix_type(4, 4))); | ||
using mat4i = int __attribute__((matrix_type(4, 4))); | ||
|
||
template <typename T> | ||
using mat4_t = T __attribute__((matrix_type(4, 4))); | ||
|
||
void g() { | ||
f<mat4>(); | ||
f<mat4i>(); | ||
f<mat4_t<double>>(); | ||
} | ||
|
||
void g2(mat4* m1, mat4i* m2, mat4_t<double>* m3) { | ||
f1(m1); | ||
f1(m2); | ||
f1(m3); | ||
} |
Uh oh!
There was an error while loading. Please reload this page.