ahatanak added a comment.

This latest patch changes the way `D` is passed in the following example, which 
doesn't use `trivial_abi` at all:

  struct B0 {
    int a;
    B0();
    B0(const B0 &) = default;
    B0(B0 &&) = delete;
  };
  
  struct B1 {
    int a;
    B1();
    B1(const B1 &) = delete;
    B1(B1 &&) = default;
  };
  
  struct D {
    B0 b0;
    B1 b1;
  };
  
  void testB0(B0 a) {
  }
  
  void testB1(B1 a) {
  }
  
  void testD(D a) {
  }

`D` should be passed indirectly according to the existing rules, but this patch 
changes that.

I think we should first clarify or decide what the rules should be when 
`trivial_abi` is used on a class or one of its subobjects.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92361/new/

https://reviews.llvm.org/D92361

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to