================ @@ -8732,6 +8732,18 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) { } } + // zero sized static arrays are not allowed in HIP device functions + if (getLangOpts().HIP && + DeclAttrsMatchCUDAMode(getLangOpts(), getCurFunctionDecl())) { ---------------- efriedma-quic wrote:
The check there is `isDeviceSideDecl == LangOpts.CUDAIsDevice`... but you don't want to diagnose this on host, do you? (The regression test only checks the -fcuda-is-device case.) https://github.com/llvm/llvm-project/pull/113470 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits