xazax.hun accepted this revision.
xazax.hun added a comment.
This revision is now accepted and ready to land.

LGTM, thanks!



================
Comment at: clang/test/Analysis/Inputs/system-header-simulator-cxx.h:965
+  template <typename T>
+  void swap(unique_ptr<T> &x, unique_ptr<T> &y) noexcept {
+    x.swap(y);
----------------
Maybe it is worth to add a TODO to introduce an additional template parameter 
once the deleter is added above.

https://en.cppreference.com/w/cpp/memory/unique_ptr/swap2


================
Comment at: clang/test/Analysis/smart-ptr.cpp:124
+
+void derefOnStdSwappedNullPtr() {
+  std::unique_ptr<A> P(new A());
----------------
This test case is very similar to the first one. Maybe you could move them 
closer. And you could make both pointers invalid to make them more distinct.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83877



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

Reply via email to