[clang] 5dee501 - [analyzer] Move docs of SmartPtr to correct subcategory

Deep Majumder via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 20 07:43:49 PDT 2021


Author: Deep Majumder
Date: 2021-09-20T20:13:04+05:30
New Revision: 5dee50111c13bbc4480401e2eaa67f6bca1b480a

URL: https://github.com/llvm/llvm-project/commit/5dee50111c13bbc4480401e2eaa67f6bca1b480a
DIFF: https://github.com/llvm/llvm-project/commit/5dee50111c13bbc4480401e2eaa67f6bca1b480a.diff

LOG: [analyzer] Move docs of SmartPtr to correct subcategory

The docs of alpha.cplusplus.SmartPtr was incorrectly placed under
alpha.deadcode. Moved it to under alpha.cplusplus

Differential Revision: https://reviews.llvm.org/D110032

Added: 
    

Modified: 
    clang/docs/analyzer/checkers.rst

Removed: 
    


################################################################################
diff  --git a/clang/docs/analyzer/checkers.rst b/clang/docs/analyzer/checkers.rst
index 858c8e1303e8..89190b54e5a5 100644
--- a/clang/docs/analyzer/checkers.rst
+++ b/clang/docs/analyzer/checkers.rst
@@ -1838,6 +1838,20 @@ Method calls on a moved-from object and copying a moved-from object will be repo
    a.foo();            // warn: method call on a 'moved-from' object 'a'
  }
 
+.. _alpha-cplusplus-SmartPtr:
+
+alpha.cplusplus.SmartPtr (C++)
+""""""""""""""""""""""""""""""
+Check for dereference of null smart pointers.
+
+.. code-block:: cpp
+
+ void deref_smart_ptr() {
+   std::unique_ptr<int> P;
+   *P; // warn: dereference of a default constructed smart unique_ptr
+ }
+
+
 alpha.deadcode
 ^^^^^^^^^^^^^^
 .. _alpha-deadcode-UnreachableCode:
@@ -1872,19 +1886,6 @@ Check unreachable code.
    [x retain]; // warn
  }
 
-.. _alpha-cplusplus-SmartPtr:
-
-alpha.cplusplus.SmartPtr (C++)
-""""""""""""""""""""""""""""""
-Check for dereference of null smart pointers.
-
-.. code-block:: cpp
-
- void deref_smart_ptr() {
-   std::unique_ptr<int> P;
-   *P; // warn: dereference of a default constructed smart unique_ptr
- }
-
 alpha.fuchsia
 ^^^^^^^^^^^^^
 


        


More information about the cfe-commits mailing list