tra added inline comments.
================
Comment at: clang/test/SemaCUDA/amdgpu-bf16.cu:9
+
+__device__ void devicefn() {
+}
----------------
Pierre-vh wrote:
> 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?
I don't have a good answer. That was one of the reasons I ended up implementing
`__bf16` support in NVPTX. :-)
You may need to use deferred diagnostics, instead of disabling them) and
trigger them if we need to codegen anything that uses `__bf16`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138651/new/
https://reviews.llvm.org/D138651
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits