================
@@ -165,3 +165,29 @@ HFAMatrix2 ret_hfa_matrix2() {
   return r;
 }
 // CHECK: define{{.*}} %struct.HFAMatrix2 @ret_hfa_matrix2
+
+// Empty records and zero-size types are ignored as returns (void).
+typedef struct {
+} Empty;
+Empty ret_empty(void) {
+  Empty e;
+  return e;
+}
+// CHECK: define{{.*}} void @ret_empty()
+
+typedef union {
+} EmptyUnion;
+EmptyUnion ret_empty_union(void) {
+  EmptyUnion u;
+  return u;
+}
+// CHECK: define{{.*}} void @ret_empty_union()
+
+typedef struct {
----------------
madhur13490 wrote:

The .c argument test adds both ZeroSize and NestedZeroSize; this one only has 
ZeroSize. Worth adding the nested case for symmetry since it's two lines.

https://github.com/llvm/llvm-project/pull/224476
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to