NoQ added inline comments.
================ Comment at: lib/StaticAnalyzer/Checkers/MoveChecker.cpp:385-386 + } + // Provide the caller with the classification of the object + // we've obtained here accidentally, for later use. + return OK; ---------------- Szelethus wrote: > Maybe move this in-class? Mmm, what do you mean? ================ Comment at: test/Analysis/use-after-move.cpp:789 // in STL the object is left in "valid but unspecified state" after move. - std::vector<int> W = std::move(V); // expected-note{{'V' became 'moved-from' here}} - V.push_back(123); // expected-warning{{Method call on a 'moved-from' object 'V'}} - // expected-note@-1{{Method call on a 'moved-from' object 'V'}} + std::vector<int> W = std::move(V); // expected-note{{Object 'V' of type 'std::vector' is left in valid but unspecified state after move}} + V.push_back(123); // expected-warning{{Method called on moved-from object 'V'}} ---------------- Note how when an object is both a local and an STL object, the bug is reported as an STL bug. Which is good because it's more dangerous to use an STL object after move than to use your average local variable after move. https://reviews.llvm.org/D54560 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits