jdoerfert added a comment.
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.or
Fznamznon marked 2 inline comments as done.
Fznamznon added inline comments.
Comment at: clang/lib/Sema/SemaExpr.cpp:216
+ if (getLangOpts().SYCLIsDevice)
+if (auto VD = dyn_cast(D))
+ if (VD->getTLSKind() != VarDecl::TLS_None)
riccibruno wrote:
> Nit:
Fznamznon updated this revision to Diff 270135.
Fznamznon added a comment.
Fixed code style.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81641/new/
https://reviews.llvm.org/D81641
Files:
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaExpr.cp
riccibruno added inline comments.
Comment at: clang/lib/Sema/SemaExpr.cpp:216
+ if (getLangOpts().SYCLIsDevice)
+if (auto VD = dyn_cast(D))
+ if (VD->getTLSKind() != VarDecl::TLS_None)
Nit: The convention is `auto *VD`.
Repository:
rG LLVM Github Mo
erichkeane accepted this revision.
erichkeane added a comment.
This revision is now accepted and ready to land.
Give @ABataev and @jdoerfert a day or two to review before committing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81641/new/
https://
Fznamznon created this revision.
Herald added subscribers: cfe-commits, sstefan1, Anastasia, ebevhan, yaxunl.
Herald added a reviewer: jdoerfert.
Herald added a project: clang.
Fznamznon added reviewers: erichkeane, bader.
Fznamznon added a subscriber: ABataev.
Fznamznon added a comment.
@jdoerfer
Fznamznon added a subscriber: ABataev.
Fznamznon added a comment.
@jdoerfert , @ABataev , if OpenMP needs same diagnostic as well, I can
generalize it between SYCL and OpenMP.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81641/new/
https://review