@@ -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 &&
+
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:
@@ -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 &&
+
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
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
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
@@ -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();
+
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
@@ -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 &&
+
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
@@ -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())) {
@@ -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())) {
@@ -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())) {
13 matches
Mail list logo