sberg added a comment. This change causes
#include <memory> std::shared_ptr<int> x1; std::shared_ptr<int> f() { std::shared_ptr<int> & r = x1; r.reset(new int); return r; } int main() { std::shared_ptr<int> x2 = f(); long n = x2.use_count(); return n; } when built with `-std=c++20` to erroneously return a `use_count` of 1 instead of 2 now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88220/new/ https://reviews.llvm.org/D88220 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits