[PATCH] Re-adding the isSpelledAsLValue check in Consumed analysis
Delesley Hutchins
delesley at google.com
Tue Feb 25 11:50:22 PST 2014
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 <richard at metafoo.co.uk> 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 | delesley at google.com | 505-206-0315
More information about the cfe-commits
mailing list