hliao marked 2 inline comments as done. hliao added inline comments.
================ Comment at: clang/include/clang/Sema/Sema.h:11442 + ContextDecl = getCUDACurrentNonLocalVariable(); + return ContextDecl; + } ---------------- rjmccall wrote: > This is tricky because we could be in a nested context, not just the > initializer, and that context just might not be a function. For example, > there could be a local class in a lambda or something like that. You are right. Limit that to function and TU context so far. I need more efforts to consider other cases. One case in mind is that default member initialier in a class. But, for local classes in a lambda, they should be in a function (lambda function body) context. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits