[PATCH] D138651: [CUDA][HIP] Don't diagnose use for __bf16
Pierre van Houtryve via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 1 00:16:43 PST 2022
Pierre-vh marked an inline comment as done.
Pierre-vh added inline comments.
================
Comment at: clang/test/SemaCUDA/amdgpu-bf16.cu:9
+
+__device__ void devicefn() {
+}
----------------
tra wrote:
> We should probably also have a case verifying that actual attempt to use `__bf16` in device code is still diagnosed.
Good catch, it's currently no longer diagnosed.
What can I use in `ConvertDeclSpecToType` to make it diagnose only if the current function is a device function? If I understand correctly, LangOpts are for the whole TU so I can't use that (e.g. CUDAIsDevice), right?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138651/new/
https://reviews.llvm.org/D138651
More information about the cfe-commits
mailing list