Author: Balázs Kéri Date: 2024-06-20T16:41:51+02:00 New Revision: 2e515ed60a6d63610a7b0d485158ca4d32f9cbce
URL: https://github.com/llvm/llvm-project/commit/2e515ed60a6d63610a7b0d485158ca4d32f9cbce DIFF: https://github.com/llvm/llvm-project/commit/2e515ed60a6d63610a7b0d485158ca4d32f9cbce.diff LOG: [clang] Move 'alpha.cplusplus.MisusedMovedObject' to 'cplusplus.Move' in documentation (NFC) (#95003) The checker was renamed at some time ago but the documentation was not updated. The section is now just moved and renamed. The documentation is still very simple and needs improvement. Added: Modified: clang/docs/analyzer/checkers.rst Removed: ################################################################################ diff --git a/clang/docs/analyzer/checkers.rst b/clang/docs/analyzer/checkers.rst index d76ee241da797..b8d5f372bdf61 100644 --- a/clang/docs/analyzer/checkers.rst +++ b/clang/docs/analyzer/checkers.rst @@ -416,6 +416,25 @@ around, such as ``std::string_view``. // note: inner buffer of 'std::string' deallocated by call to destructor } +.. _cplusplus-Move: + +cplusplus.Move (C++) +"""""""""""""""""""" +Method calls on a moved-from object and copying a moved-from object will be reported. + + +.. code-block:: cpp + + struct A { + void foo() {} + }; + + void f() { + A a; + A b = std::move(a); // note: 'a' became 'moved-from' here + a.foo(); // warn: method call on a 'moved-from' object 'a' + } + .. _cplusplus-NewDelete: cplusplus.NewDelete (C++) @@ -2584,25 +2603,6 @@ Check for use of iterators of diff erent containers where iterators of the same c // expected } -.. _alpha-cplusplus-MisusedMovedObject: - -alpha.cplusplus.MisusedMovedObject (C++) -"""""""""""""""""""""""""""""""""""""""" -Method calls on a moved-from object and copying a moved-from object will be reported. - - -.. code-block:: cpp - - struct A { - void foo() {} - }; - - void f() { - A a; - A b = std::move(a); // note: 'a' became 'moved-from' here - a.foo(); // warn: method call on a 'moved-from' object 'a' - } - .. _alpha-cplusplus-SmartPtr: alpha.cplusplus.SmartPtr (C++) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits