svenvh added inline comments.
Herald added a subscriber: ldrumm.

================
Comment at: clang/test/SemaOpenCLCXX/template-astype.cl:5
+auto templated_astype(T x) {
+  return as_int2(x);
+  // expected-error@-1{{invalid reinterpretation: sizes of 'int2' (vector of 2 
'int' values) and '__private int' must match}}
----------------
Anastasia wrote:
> could we also add another template with use of `__builtin_astype` directly?
> 
> In case we change as_type implementation one day the clang builtin will still 
> be tested too. :)
Sure, I can add extend this test with the following before committing, if that 
is okay with you?

```// Test __builtin_astype.
template <typename T>
auto templated_builtin_astype(T x) {
  return __builtin_astype(x, int2);
}

auto test_builtin(char8 x) { return templated_builtin_astype(x); }```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98855/new/

https://reviews.llvm.org/D98855

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to