xazax.hun added inline comments.
================
Comment at: clang/test/Analysis/Inputs/system-header-simulator-cxx.h:964-965
+
+ template <typename T>
+ void swap(unique_ptr<T> &x, unique_ptr<T> &y) noexcept {
+ x.swap(y);
----------------
NoQ wrote:
> You seem to be relying on the fact that global `std::swap` is implemented in
> terms of the member `std::swap`. That's an implementation detail of the
> standard library; i'm not sure that this is always the case. Ideally we
> should model the global `std::swap` separately.
I am not sure how reliable cppreference is, but I think this overload might
actually be guaranteed by the standard:
https://en.cppreference.com/w/cpp/memory/unique_ptr/swap2
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83877/new/
https://reviews.llvm.org/D83877
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits