tra added inline comments.
Comment at: clang/lib/Sema/SemaDecl.cpp:7247-7250
+ // CUDA/HIP: Function-scope static variables in device or global functions
+ // have implicit device or constant attribute. Function-scope static
variables
+ // in host device functions have implic
yaxunl updated this revision to Diff 320644.
yaxunl marked 6 inline comments as done.
yaxunl added a comment.
Revised by Artem's comments
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95560/new/
https://reviews.llvm.org/D95560
Files:
clang/lib/AST/ASTContext.cpp
clang/lib/CodeGen/C
yaxunl marked 6 inline comments as done.
yaxunl added inline comments.
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:101
+// does that.
+class CUDAStaticDeviceVarEmitter
+: public StmtVisitor {
tra wrote:
> Nit. "This class does that" could be dropped. I'd
tra added a comment.
> A static variable in device and global functions is supposed to have
> implicit device attribute. Currently it does not. This causes incorrect
> diagnostics about host variables accessed by device functions.
Correct diagnostics sevice-side local static vars is a valid conc
yaxunl created this revision.
yaxunl added a reviewer: tra.
yaxunl requested review of this revision.
Currently static variables are allowed in device, global, and host device
functions.
A static variable in device and global functions is supposed to have
implicit device attribute. Currently it d