[PATCH] D54563: [analyzer] MoveChecker Pt.4: Add a few more state reset methods.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 3 16:22:44 PST 2018


NoQ added a comment.

In D54563#1306358 <https://reviews.llvm.org/D54563#1306358>, @Szelethus wrote:

> This suggests to me that `list1.splice(list1.begin(), std::move(list2))` leaves  `list2` in a valid, well-defined, but empty state.


I think this should work automagically. Because `list2` is passed by non-const reference (eg., rvalue reference) into an unknown function, it will be invalidated when the call is modeled conservatively, and therefore we will stop tracking it in the `checkRegionChanges` callback.


Repository:
  rC Clang

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

https://reviews.llvm.org/D54563





More information about the cfe-commits mailing list