[PATCH] D114080: [SYCL] Diagnose uses of zero length arrays

Mariya Podchishchaeva via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 17 06:38:03 PST 2021


Fznamznon added a comment.

> I agree, but having a field defined is different from it being used. It is actually not uncommon to see SYCL functor passed with many unused fields (Eigen is good example).

Are you saying that it is better to diagnose just used fields?
I believe it is safer to diagnose everything, because some backends or SPIR-V emitters may not expect that and crash or throw non-user friendly errors, because usually it is up to front-end to emit errors when some unsupported feature appears in device code (even unused).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114080



More information about the cfe-commits mailing list