I think the analysis should give special handling to std::move, and nothing else. The case in which people want to write their own std::move is not one that I feel the need to support.
-DeLesley On Mon, Feb 24, 2014 at 4:28 PM, Richard Smith <[email protected]> wrote: > > There's no way in general to know whether a function that takes a `T &` > consumes it, other than by inspecting its implementation. I believe the > conservatively-correct thing to do is to assume that such functions do not > consume, and that's what we already do here. > > If we have attributes to allow people to annotate their custom `move` > implementations, I think our position is already reasonable here. Maybe we > could add a warning when analysis of the implementation of a function > determines that it consumes one of its by-lvalue-reference parameters and it > lacks the attribute? > > http://llvm-reviews.chandlerc.com/D2872 -- DeLesley Hutchins | Software Engineer | [email protected] | 505-206-0315 _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
