[PATCH] D98855: [OpenCL] Support template parameters for as_type

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 18 08:04:55 PDT 2021


Anastasia accepted this revision.
Anastasia added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/test/SemaOpenCLCXX/template-astype.cl:5
+auto templated_astype(T x) {
+  return as_int2(x);
+  // expected-error at -1{{invalid reinterpretation: sizes of 'int2' (vector of 2 'int' values) and '__private int' must match}}
----------------
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. :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98855



More information about the cfe-commits mailing list