rjmccall added inline comments.
================ Comment at: include/clang/Basic/TargetInfo.h:944 + /// \brief Whether target supports variable-length arrays. + bool isVLASupported() const { return VLASupported; } + ---------------- Hahnfeld wrote: > rjmccall wrote: > > The way you've written this makes it sound like "does the target support > > VLAs?", but the actual semantic checks treat it as "do OpenMP devices on > > this target support VLAs?" Maybe there should be a more specific way to > > query things about OpenMP devices instead of setting a global flag for the > > target? > Actually, the NVPTX and SPIR targets never support VLAs. So I felt like it > would be more correct to make this a global property of the target. > > The difference is that the other programming models (OpenCL and CUDA) error > out immediatelyand regardless of the target because this limitation is > reflected in the standards that disallow VLAs (see SemaType.cpp). For OpenMP > we might have target devices that support VLA so we shouldn't error out for > those. If you want to make it a global property of the target, that's fine, but then I don't understand why your diagnostic only fires when (S.isInOpenMPDeclareTargetContext() || S.isInOpenMPTargetExecutionDirective()). https://reviews.llvm.org/D39505 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits