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

2018-12-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348235: [analyzer] MoveChecker: Add more common state resetting methods. (authored by dergachev, committed by ). Changed prior to commit: https://reviews.llvm.org/D54563?vs=176512&id=176537#toc Reposit

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

2018-12-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Hmm, i shouldn't have included `shrink_to_fit`. It definitely keeps the object in unspecified state if it is already in unspecified state. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54563/new/ https://reviews.llvm.org/D54563 __

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

2018-12-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I'm glad you brought this stuff up, found two more bugs to fix. In D54563#1317678 , @Szelethus wrote: > Can you add tests for that just in case? :) The test works, but i noticed that we aren't respecting const references. That is,

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

2018-12-03 Thread Kristüf Umann via Phabricator via cfe-commits
Szelethus added a comment. Okay, I submit! :D Comment at: test/Analysis/use-after-move.cpp:260-262 for (int i = 0; i < bignum(); i++) { // expected-note {{Loop condition is false. Execution jumps to the end of the function}} rightRefCall(std::move(a));// no

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

2018-12-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. 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::m

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

2018-12-03 Thread Kristüf Umann via Phabricator via cfe-commits
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

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

2018-12-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 176512. NoQ added a comment. Add a TODO. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54563/new/ https://reviews.llvm.org/D54563 Files: lib/StaticAnalyzer/Checkers/MoveChecker.cpp test/Analysis/use-after-move.cpp Index: test/Analysis/use-after-m

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

2018-12-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In 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

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

2018-11-22 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. In https://reviews.llvm.org/D54563#1301893, @NoQ wrote: > In https://reviews.llvm.org/D54563#1299918, @Szelethus wrote: > > > How about `std::list::splice`? > > > Hmm, you mean that it leaves its argument empty? Interesting, i guess we may > need a separate facility fo

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

2018-11-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D54563#1299918, @Szelethus wrote: > How about `std::list::splice`? Hmm, you mean that it leaves its argument empty? Interesting, i guess we may need a separate facility for that. I wonder how many other state-reset methods are we forgetting.

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

2018-11-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. How about `std::list::splice`? Repository: rC Clang https://reviews.llvm.org/D54563 ___ cfe-commits mailing list cfe-commits@lists.llvm.

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

2018-11-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs, Szelethus. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, baloghadamsoftware. This covers methods that //may// reset the state depending on the value