[PATCH] D135175: [clang] adds `__is_bounded_array` and `__is_unbounded_array` as builtins
Christopher Di Bella via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 5 10:22:00 PDT 2022
cjdb added inline comments.
================
Comment at: clang/lib/Sema/SemaType.cpp:2630
// CUDA device code and some other targets don't support VLAs.
- targetDiag(Loc, (getLangOpts().CUDA && getLangOpts().CUDAIsDevice)
- ? diag::err_cuda_vla
- : diag::err_vla_unsupported)
- << ((getLangOpts().CUDA && getLangOpts().CUDAIsDevice)
- ? CurrentCUDATarget()
- : CFT_InvalidTarget);
+ bool IsCUDADevice = (getLangOpts().CUDA && getLangOpts().CUDAIsDevice);
+ targetDiag(Loc,
----------------
shafik wrote:
> This feels like an unrelated change.
>
> Is this diagnostic tested anywhere?
This change hardcodes the first option for `err_vla_unsupported`, since it now has a `%select`. No change in relevant tests necessary, since the existing tests should already catch this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135175/new/
https://reviews.llvm.org/D135175
More information about the cfe-commits
mailing list