dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.

"Also, fix the order of if statements so that an explicit return_typestate 
annotation takes precedence over the default behavior for rvalue refs."

I'd probably have split that out into a separate patch - in part to discuss the 
design implications of that. I have some doubts about supporting non-consumed 
after passing by rvalue ref, but don't feel too strongly & the alternative 
would be having a warning about the attribute being ignored, etc - when it has 
a fairly clear meaning if it is there, just not sure people 'should' be doing 
that.



================
Comment at: test/SemaCXX/warn-consumed-analysis.cpp:62-64
+
+  static void byVal(DestructorTester);
+  static void byValMarkUnconsumed(DestructorTester 
RETURN_TYPESTATE(unconsumed));
----------------
unless these are testing something noteworthy about them being static functions 
I'd probably suggest making them non-members like the other test functions 
below, for consistency (otherwise the inconsistency tends to raise the question 
of "what is significant about this difference?")


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67743/new/

https://reviews.llvm.org/D67743



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to