PiotrZSL added a comment. I was thinking... In theory fix for this check should be one of: use const &, use value, move rvalue. But const & is not always in an option, in utils we got 2 functions: isOnlyUsedAsConst, isExpensiveToCopy. So in theory if variable can be used as const, then const & can be used, if var cannot be used as const and is cheap to copy, then in theory value can be used, otherwise we deal with something intended (like partial move, or write to variable), and such cases could be +- ignored in relaxed mode.
Still, this is just something to thing, not necessarily to implement. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141569/new/ https://reviews.llvm.org/D141569 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits