jlebar added inline comments. ================ Comment at: lib/Sema/SemaDecl.cpp:8011-8013 @@ +8010,5 @@ + // allowed, so we just treat those as host-only. + if (getLangOpts().CUDA && getLangOpts().CUDAHostDeviceConstexpr && + NewFD->isConstexpr() && !NewFD->isVariadic() && + !NewFD->hasAttr<CUDAHostAttr>() && !NewFD->hasAttr<CUDADeviceAttr>()) { + NewFD->addAttr(CUDAHostAttr::CreateImplicit(Context)); ---------------- tra wrote: > Can we have constexpr `__global__` ? Yikes. We're saved (unless Richard has a tricky counterexample) because kernels must be void and constexpr must not be void. But I'll add a check here anyway.
http://reviews.llvm.org/D18380 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits