[clang] [clang][HIP] Disallow non-constant format string with pointer argument (PR #238287)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 3 03:49:10 PST 2026


================
@@ -0,0 +1,32 @@
+// REQUIRES: amdgpu-registered-target, spirv-registered-target
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -x hip -fcuda-is-device \
+// RUN:    -Wno-format-security -verify -emit-llvm-only %s
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -x hip -fcuda-is-device \
+// RUN:    -mprintf-kind=buffered -Wno-format-security -verify -emit-llvm-only %s
+// RUN: %clang_cc1 -triple spirv64-amd-amdhsa -x hip -fcuda-is-device \
+// RUN:    -Wno-format-security -verify -emit-llvm-only %s
+// RUN: %clang_cc1 -triple spirv64-amd-amdhsa -x hip -fcuda-is-device \
+// RUN:    -mprintf-kind=buffered -Wno-format-security -verify -emit-llvm-only %s
----------------
Fznamznon wrote:

That is also weird because it seems that to see and check the error you need to combine -verify and -emit-llvm

https://github.com/llvm/llvm-project/pull/238287


More information about the cfe-commits mailing list