[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-11-01 Thread Vigneshwar Jayakumar via cfe-commits
@@ -8714,6 +8714,21 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) { } } + // zero sized static arrays are not allowed in HIP device functions + if (LangOpts.CUDAIsDevice && LangOpts.HIP) { +if (FunctionDecl *FD = getCurFunctionDecl(); +FD && +

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-10-23 Thread Vigneshwar Jayakumar via cfe-commits
https://github.com/VigneshwarJ created https://github.com/llvm/llvm-project/pull/113470 Added diagnosis to throw error when zero sized arrays are used in the HIP device code. SWDEV-449592 >From 0e2ee524f5b5c19169e446c55a386a00cfb0f6bc Mon Sep 17 00:00:00 2001 From: vigneshwar jayakumar Date:

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-10-28 Thread Vigneshwar Jayakumar via cfe-commits
@@ -8714,6 +8714,31 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) { } } + // zero sized static arrays are not allowed in HIP device functions + if (LangOpts.CUDAIsDevice && LangOpts.HIP) { +if (FunctionDecl *FD = getCurFunctionDecl(); +FD && +

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-10-28 Thread Vigneshwar Jayakumar via cfe-commits
https://github.com/VigneshwarJ updated https://github.com/llvm/llvm-project/pull/113470 >From 0e2ee524f5b5c19169e446c55a386a00cfb0f6bc Mon Sep 17 00:00:00 2001 From: vigneshwar jayakumar Date: Wed, 23 Oct 2024 09:20:16 -0500 Subject: [PATCH 1/3] [Clang/AMDGPU] Zero sized arrays not allowed in H

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-11-11 Thread Vigneshwar Jayakumar via cfe-commits
https://github.com/VigneshwarJ updated https://github.com/llvm/llvm-project/pull/113470 >From 0e2ee524f5b5c19169e446c55a386a00cfb0f6bc Mon Sep 17 00:00:00 2001 From: vigneshwar jayakumar Date: Wed, 23 Oct 2024 09:20:16 -0500 Subject: [PATCH 1/4] [Clang/AMDGPU] Zero sized arrays not allowed in H

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-10-25 Thread Vigneshwar Jayakumar via cfe-commits
https://github.com/VigneshwarJ updated https://github.com/llvm/llvm-project/pull/113470 >From 0e2ee524f5b5c19169e446c55a386a00cfb0f6bc Mon Sep 17 00:00:00 2001 From: vigneshwar jayakumar Date: Wed, 23 Oct 2024 09:20:16 -0500 Subject: [PATCH 1/2] [Clang/AMDGPU] Zero sized arrays not allowed in H

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-10-25 Thread Vigneshwar Jayakumar via cfe-commits
@@ -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(); +

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-11-07 Thread Vigneshwar Jayakumar via cfe-commits
https://github.com/VigneshwarJ updated https://github.com/llvm/llvm-project/pull/113470 >From 0e2ee524f5b5c19169e446c55a386a00cfb0f6bc Mon Sep 17 00:00:00 2001 From: vigneshwar jayakumar Date: Wed, 23 Oct 2024 09:20:16 -0500 Subject: [PATCH 1/4] [Clang/AMDGPU] Zero sized arrays not allowed in H

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-11-20 Thread Vigneshwar Jayakumar via cfe-commits
@@ -8714,6 +8714,21 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) { } } + // zero sized static arrays are not allowed in HIP device functions + if (LangOpts.CUDAIsDevice && LangOpts.HIP) { +if (FunctionDecl *FD = getCurFunctionDecl(); +FD && +

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-11-20 Thread Vigneshwar Jayakumar via cfe-commits
https://github.com/VigneshwarJ updated https://github.com/llvm/llvm-project/pull/113470 >From 0e2ee524f5b5c19169e446c55a386a00cfb0f6bc Mon Sep 17 00:00:00 2001 From: vigneshwar jayakumar Date: Wed, 23 Oct 2024 09:20:16 -0500 Subject: [PATCH 1/5] [Clang/AMDGPU] Zero sized arrays not allowed in H

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-11-13 Thread Vigneshwar Jayakumar via cfe-commits
@@ -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())) {

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-11-14 Thread Vigneshwar Jayakumar via cfe-commits
@@ -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())) {

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-11-14 Thread Vigneshwar Jayakumar via cfe-commits
@@ -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())) {