tra added a comment. In D91088#2388496 <https://reviews.llvm.org/D91088#2388496>, @yaxunl wrote:
> added diagnosing referencing host variable in device functions Thank you for fixing this. The new changes look good, but I think they should be in a separate patch. ================ Comment at: clang/lib/Sema/SemaExpr.cpp:357 + if (LangOpts.CUDAIsDevice) { + auto *FD = dyn_cast_or_null<FunctionDecl>(CurContext); ---------------- This could use a comment about why we only check `D->H` references. `H->D` references will still work (sort of) because on the host side we have matching `shadow` variables. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91088/new/ https://reviews.llvm.org/D91088 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits