aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land.
LGTM but please wait a bit in case @MaskRay has comments. ================ Comment at: clang/unittests/AST/RandstructTest.cpp:72 + + return std::tuple<ASTUnit *, ASTUnit *>(AST.release(), ASTFileSeed.release()); +}; ---------------- void wrote: > aaron.ballman wrote: > > Why not keep these as unique pointers and move them into the tuple? Then > > the callers don't have to call delete manually. > The d'tors for the `unique_ptr`s is called if I place them in the tuple. I > think it's because I can't do something like this: > > ``` > const unique_ptr<ASTUnit> std::tie(AST, ASTFileSeed) = makeAST(...); > ``` > > in the test functions. When I assign it as a non-initializer, it apparently > calls the d'tor. So, kinda stumped on what to do. > > And the `EXPECT_FALSE` above is used because the `ASSERT_FALSE` adds an extra > return point, which messes with the lambda. Okay, thank you for the explanations! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123636/new/ https://reviews.llvm.org/D123636 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits