SYCL and OpenMP prohibits thread local storage in device code,
so this commit ensures that error is emitted for device code and not
emitted for host code when host target supports it.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
@jdoerfert , @ABataev , if OpenMP needs same diagnostic as well, I can generalize it between SYCL and OpenMP.
clang/lib/Sema/SemaExpr.cpp | ||
---|---|---|
216 | Nit: The convention is auto *VD. |
clang/lib/Sema/SemaExpr.cpp | ||
---|---|---|
216 | Fixed, thanks! |
OpenMP has the same restriction (no surprise I guess). Thanks for the ping!
I think we do not emit diagnosis right now: https://godbolt.org/z/srDkXZ
I think we also should diagnose this the same way, though it might be beyond the scope of this patch: https://godbolt.org/z/rRZFi4
Alright, now the first case that you pointed is diagnosed as well.
The second case is not diagnosed at all and I agree that it seems beyond the scope of this patch, because it looks like using of #pragma omp task untied doesn't trigger emission of deferred diagnostics.
Nice, thanks a lot!
The second case is not diagnosed at all and I agree that it seems beyond the scope of this patch, because it looks like using of #pragma omp task untied doesn't trigger emission of deferred diagnostics.
Yeah, we need to track untied tasks first. Not as part of this though.
LGTM :)
Seems that test/OpenMP/nvptx_target_codegen.cpp is completely not formatted. If I apply suggestion from pre-merge checks, this will look like a big unrelated to this patch change and it will contradict with the whole file style.
I formatted this file here: https://github.com/llvm/llvm-project/commit/93cd4115799cefa698833ca7a2f1899243d94c77.
Could you rebase your patch, please?
Nit: The convention is auto *VD.