yaxunl marked an inline comment as done.
yaxunl added inline comments.
================
Comment at: clang/lib/Sema/SemaExpr.cpp:357
+ if (LangOpts.CUDAIsDevice) {
+ auto *FD = dyn_cast_or_null<FunctionDecl>(CurContext);
----------------
tra wrote:
> This could use a comment why we only check `D->H` references.
Just added a comment:
Reference of device global variables in host functions is
allowed through shadow variables therefore it is not diagnosed.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91281/new/
https://reviews.llvm.org/D91281
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits