================
@@ -2259,6 +2259,17 @@ QualType Sema::BuildArrayType(QualType T, 
ArraySizeModifier ASM,
              isSFINAEContext() ? diag::err_typecheck_zero_array_size
                                : diag::ext_typecheck_zero_array_size)
             << 0 << ArraySize->getSourceRange();
+
+        // zero sized static arrays are not allowed in HIP device functions
+        if (LangOpts.HIP && LangOpts.CUDAIsDevice) {
----------------
VigneshwarJ wrote:

Thanks for pointing it out, moved the logic to SemaVarDeclaration, also 
checking for the typedef and pointers

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

Reply via email to