fowles added a subscriber: fowles.

================
Comment at: test/clang-tidy/misc-use-after-move.cpp:158
@@ +157,3 @@
+    std::move(ptr);
+    ptr.get();
+  }
----------------
would this warn on:

std::unique_ptr<A> ptr;
std::move(ptr);
ptr->Foo();

I would like it to since that is a likely segfault.

================
Comment at: test/clang-tidy/misc-use-after-move.cpp:279
@@ +278,3 @@
+    A a;
+    auto lambda = [=]() { a.foo(); };
+    std::move(a);
----------------
can you add tests with reference capture?

also what about:

A a;
auto lambda = [&]() { a.foo(); };
std::move(a);
lambda();


https://reviews.llvm.org/D23353



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

Reply via email to