[PATCH] D54563: [analyzer] MoveChecker Pt.4: Add a few more state reset methods.
Kristüf Umann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 3 16:33:40 PST 2018
Szelethus added a comment.
Can you add tests for that just in case? :)
================
Comment at: test/Analysis/use-after-move.cpp:331
for (int i = 0; i < bignum(); i++) { // expected-note {{Loop condition is true. Entering loop body}} expected-note {{Loop condition is true. Entering loop body}}
constCopyOrMoveCall(std::move(a)); // expected-warning {{Moved-from object is moved 'a'}} expected-note {{Moved-from object is moved 'a'}}
// expected-note at -1 {{'a' is moved}}
----------------
>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.
Hmmm. Doesn't this check something similar, but still cause an warning?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54563/new/
https://reviews.llvm.org/D54563
More information about the cfe-commits
mailing list