[PATCH] D81641: [SYCL] Implement thread-local storage restriction

2020-06-11 Thread Johannes Doerfert via Phabricator via cfe-commits
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

[PATCH] D81641: [SYCL] Implement thread-local storage restriction

2020-06-11 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
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:

[PATCH] D81641: [SYCL] Implement thread-local storage restriction

2020-06-11 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
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

[PATCH] D81641: [SYCL] Implement thread-local storage restriction

2020-06-11 Thread Bruno Ricci via Phabricator via cfe-commits
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

[PATCH] D81641: [SYCL] Implement thread-local storage restriction

2020-06-11 Thread Erich Keane via Phabricator via cfe-commits
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://

[PATCH] D81641: [SYCL] Implement thread-local storage restriction

2020-06-11 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
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

[PATCH] D81641: [SYCL] Implement thread-local storage restriction

2020-06-11 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
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