================ @@ -2735,6 +2735,41 @@ TEST(TransferTest, ResultObjectLocationForDefaultInitExpr) { }); } +// This test ensures that CXXOperatorCallExpr returning prvalues are correctly +// handled by the transfer functions, especially that `getResultObjectLocation` +// correctly returns a storage location for those. +TEST(TransferTest, ResultObjectLocationForCXXOperatorCallExpr) { + std::string Code = R"( + struct A { + virtual ~A() = default; + A operator+(int a) { return A(); } ---------------- martinboehme wrote:
You don't need to provide the implementation. ```suggestion A operator+(int); ``` https://github.com/llvm/llvm-project/pull/79608 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits