yaxunl marked 2 inline comments as done. yaxunl added inline comments.
================ Comment at: clang/lib/Sema/SemaCUDA.cpp:538 AllowedInit = - ((VD->getType()->isDependentType() || Init->isValueDependent()) && - VD->isConstexpr()) || + (VD->getType()->isDependentType() || Init->isValueDependent()) || Init->isConstantInitializer(Context, ---------------- tra wrote: > Nit, no need for `()` any more, as all parts of the expression ar `||`-ed > together. will do ================ Comment at: clang/test/SemaCUDA/dependent-device-var.cu:8 +__device__ int fun1(T x) { + static __device__ int a = sizeof(x); + static __device__ int b = x; ---------------- tra wrote: > So, the patch now allows using type-dependent constant expressions now. > I'd add a comment highlighting this. It's not always obvious that the test's > purpose is to verify the absence of an error. will do CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95840/new/ https://reviews.llvm.org/D95840 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits