[clang] [CIR] Cleanup support for C functions (PR #136854)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Mon May 12 09:38:59 PDT 2025


================
@@ -233,6 +233,19 @@ int f8(int *p) {
 // OGCG:   %[[P2:.*]] = load ptr, ptr %[[P_PTR]], align 8
 // OGCG:   %[[STAR_P:.*]] = load i32, ptr %[[P2]], align 4
 
+
+void f9() {}
----------------
andykaylor wrote:

Since you added handling for required arguments, can you add a test that has a declaration with optional arguments and calls to that function with optional arguments emitted? I'd suggest a function with one required argument and two optional arguments and calls to that function with one, two, and three arguments provided. Perhaps also a test with zero required arguments and two optional arguments, called with zero, one, and two arguments.

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


More information about the cfe-commits mailing list