https://github.com/balazske created 
https://github.com/llvm/llvm-project/pull/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.

From 6bcef3384ed986447b10a5eec8196c3bed3ce8e0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= <balazs.k...@ericsson.com>
Date: Mon, 10 Jun 2024 17:28:17 +0200
Subject: [PATCH] [clang] Move 'alpha.cplusplus.MisusedMovedObject' to
 'cplusplus.Move' in documentation (NFC)

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.
---
 clang/docs/analyzer/checkers.rst | 38 ++++++++++++++++----------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/clang/docs/analyzer/checkers.rst b/clang/docs/analyzer/checkers.rst
index f53dd545df5a9..402ed1b4326a8 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++)
@@ -2599,25 +2618,6 @@ Check for use of iterators of different 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

Reply via email to