[libclc] libclc: Correctly declare __clc_get_max_sub_group_size as taking no arguments (PR #185265)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 8 01:19:03 PST 2026


https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/185265

None

>From ea1e443bf5a5a281b1d6ed0ae642d09d1698715d Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Sun, 8 Mar 2026 10:14:24 +0100
Subject: [PATCH] libclc: Correctly declare __clc_get_max_sub_group_size as
 taking no arguments

---
 libclc/clc/include/clc/workitem/clc_get_max_sub_group_size.h | 2 +-
 libclc/clc/lib/amdgcn/workitem/clc_get_max_sub_group_size.cl | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libclc/clc/include/clc/workitem/clc_get_max_sub_group_size.h b/libclc/clc/include/clc/workitem/clc_get_max_sub_group_size.h
index c8ea2a1fead12..0e3b67f64b809 100644
--- a/libclc/clc/include/clc/workitem/clc_get_max_sub_group_size.h
+++ b/libclc/clc/include/clc/workitem/clc_get_max_sub_group_size.h
@@ -11,6 +11,6 @@
 
 #include <clc/internal/clc.h>
 
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL uint __clc_get_max_sub_group_size();
+_CLC_OVERLOAD _CLC_CONST _CLC_DECL uint __clc_get_max_sub_group_size(void);
 
 #endif // __CLC_WORKITEM_CLC_GET_MAX_SUB_GROUP_SIZE_H__
diff --git a/libclc/clc/lib/amdgcn/workitem/clc_get_max_sub_group_size.cl b/libclc/clc/lib/amdgcn/workitem/clc_get_max_sub_group_size.cl
index 7df7f21d9098f..5eb0166135663 100644
--- a/libclc/clc/lib/amdgcn/workitem/clc_get_max_sub_group_size.cl
+++ b/libclc/clc/lib/amdgcn/workitem/clc_get_max_sub_group_size.cl
@@ -10,7 +10,7 @@
 #include "clc/shared/clc_min.h"
 #include "clc/workitem/clc_get_max_sub_group_size.h"
 
-_CLC_OVERLOAD _CLC_DEF uint __clc_get_max_sub_group_size() {
+_CLC_OVERLOAD _CLC_DEF uint __clc_get_max_sub_group_size(void) {
   return __clc_min(__builtin_amdgcn_wavefrontsize(),
                    __clc_amdgpu_enqueued_workgroup_size());
 }



More information about the cfe-commits mailing list