================
@@ -7515,6 +7472,34 @@ a container class:
   }];
 }
 
+def UsableOnMovedDocs : Documentation {
+  let Category = DocCatFunction;
+  let Content = [{
+The ``usable_on_moved`` attribute can be applied to a non-static, C++
+member function to indicate that this member function can be invoked on a
+moved-from object.
+
+This attribute can be interpreted by static analyzers that warn about uses of 
an
+object that has been left in an indeterminate state by a move operation. If a
+member function marked with the ``usable_on_moved`` attribute is called on a
+moved-from object, the analyzer should not warn about usage in an indeterminate
----------------
Endilll wrote:

Is "indeterminate state" the way moved-from state described in the emitted 
diagnostic?

I find it unfortunate that it's so close to C++ standard's "indeterminate 
state" used for uninitialized locals while also not being correct, as there is 
nothing inherently non-deterministic about move constructors and move 
assignment operators.

https://github.com/llvm/llvm-project/pull/216121
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to