https://github.com/PiotrZSL requested changes to this pull request.
I don't see problem described by this check as an performance issue. For example: ``` std::unique_ptr<std::vector<int>> ptr; std::vector<int> local = std::move(*ptr); ``` No performance issue here, simply value may need to be moved, do not expect that someone have to always keep object in unique_ptr, at some point it may need to be moved/copied. And some types may be cheap to move. As for std::shared_ptr, yes this could be a problem. My suggestion is: - Part related to moving object from a std::shared_ptr should be a bugprone-moved-from-shared check (or some other name). - As for current check, I fear that it may cause lot of false-positives, and basicly it should work only on "heavy" types, but it could be hard to detect such heavy types. But still I don't think why that part should be reduced to just shared ptr, check that would detect std::move calls that are still heavy, simply because moved class is above XYZ bytes in size. Fix provided by this check `*std::move(p)` is also questionable... Move will still be called, and this check will still detect such issue, in that case fix does not fix anything. https://github.com/llvm/llvm-project/pull/66139 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits