Skip to content

[clang] Move 'alpha.cplusplus.MisusedMovedObject' to 'cplusplus.Move' in documentation (NFC) #95003

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

balazske
Copy link
Collaborator

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.

… 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.
@balazske balazske requested review from gamesh411 and NagyDonat June 10, 2024 15:55
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:static analyzer labels Jun 10, 2024
@llvmbot
Copy link
Member

llvmbot commented Jun 10, 2024

@llvm/pr-subscribers-clang

Author: Balázs Kéri (balazske)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/95003.diff

1 Files Affected:

  • (modified) clang/docs/analyzer/checkers.rst (+19-19)
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++)

@llvmbot
Copy link
Member

llvmbot commented Jun 10, 2024

@llvm/pr-subscribers-clang-static-analyzer-1

Author: Balázs Kéri (balazske)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/95003.diff

1 Files Affected:

  • (modified) clang/docs/analyzer/checkers.rst (+19-19)
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++)

@balazske balazske merged commit 2e515ed into llvm:main Jun 20, 2024
11 checks passed
@balazske balazske deleted the cpp-move-doc branch June 20, 2024 14:42
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 20, 2024

LLVM Buildbot has detected a new failure on builder clang-cuda-l4 running on cuda-l4-0 while building clang at step 3 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/101/builds/386

Here is the relevant piece of the build log for the reference:

Step 3 (annotate) failure: '/buildbot/cuda-build --jobs=' (failure)
...
  NV_LIBCUBLAS_PACKAGE_NAME=libcublas-12-2
  NV_LIBCUBLAS_VERSION=12.2.5.6-1
  NV_LIBCUSPARSE_VERSION=12.1.2.141-1
  NV_LIBNCCL_PACKAGE=libnccl2=2.18.5-1+cuda12.2
  NV_LIBNCCL_PACKAGE_NAME=libnccl2
  NV_LIBNCCL_PACKAGE_VERSION=2.18.5-1
  NV_LIBNPP_PACKAGE=libnpp-12-2=12.2.1.4-1
  NV_LIBNPP_VERSION=12.2.1.4-1
  NV_NVTX_VERSION=12.2.140-1
  PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/buildbot
  PWD=/buildbot/cuda-l4-0/work/cuda-l4-0/clang-cuda-l4/build
  SHLVL=1
  TERM=dumb
  WORK_DIR=/buildbot/cuda-l4-0/work
  _=/usr/local/bin/buildbot-worker
 using PTY: False
++ echo @@@HALT_ON_FAILURE@@@
++ readlink -f ..
+ buildbot_dir=/buildbot/cuda-l4-0/work/cuda-l4-0/clang-cuda-l4
+ revision=2e515ed60a6d63610a7b0d485158ca4d32f9cbce
+ GPU_ARCH=sm_89
+ CUDA_TEST_JOBS=1
+ build_base=/buildbot/cuda-l4-0/work/clang-cuda-l4
+ mkdir -p /buildbot/cuda-l4-0/work/clang-cuda-l4
+ build_dir=/buildbot/cuda-l4-0/work/clang-cuda-l4/build
+ libc_build_dir=/buildbot/cuda-l4-0/work/clang-cuda-l4/build-libc
+ clang_dir=/buildbot/cuda-l4-0/work/clang-cuda-l4/clang
+ testsuite_dir=/buildbot/cuda-l4-0/work/clang-cuda-l4/llvm-test-suite
+ llvm_src_dir=/buildbot/cuda-l4-0/work/clang-cuda-l4/llvm
+ ext_dir=/buildbot/cuda-l4-0/work/clang-cuda-l4/external
+ inner_pid=501325
+ trap 'handle_termination $inner_pid' TERM
+ do_build_and_test
+ wait 501325
+ fetch_prebuilt_clang 2e515ed60a6d63610a7b0d485158ca4d32f9cbce /buildbot/cuda-l4-0/work/clang-cuda-l4/clang
+ local revision=2e515ed60a6d63610a7b0d485158ca4d32f9cbce
+ local destdir=/buildbot/cuda-l4-0/work/clang-cuda-l4/clang
+ local 'timeout=10 minutes'
++ date -ud '10 minutes' +%s
+ local endtime=1718895713
++ storage_location llvm-2e515ed60a6d63610a7b0d485158ca4d32f9cbce
++ local file=llvm-2e515ed60a6d63610a7b0d485158ca4d32f9cbce
++ local default_storage_prefix=gs://cudabot-gce-artifacts/
++ echo gs://cudabot-gce-artifacts/llvm-2e515ed60a6d63610a7b0d485158ca4d32f9cbce
+ local snapshot=gs://cudabot-gce-artifacts/llvm-2e515ed60a6d63610a7b0d485158ca4d32f9cbce
+ step 'Waiting for LLVM & Clang snapshot to be built. '
+ local 'name=Waiting for LLVM & Clang snapshot to be built. '
+ local summary=
+ echo '@@@BUILD_STEP Waiting for LLVM & Clang snapshot to be built. @@@'
+ step_summary_clear

@haoNoQ
Copy link
Collaborator

haoNoQ commented Jun 20, 2024

The checker was renamed at some time ago but the documentation was not updated.

Yupp my bad. Thank you folks!

AlexisPerry pushed a commit to llvm-project-tlp/llvm-project that referenced this pull request Jul 9, 2024
… in documentation (NFC) (llvm#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:static analyzer clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants