[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
This commit is contained in:
Deep Majumder 2021-09-20 20:12:26 +05:30
parent f988f68064
commit 5dee50111c
1 changed files with 14 additions and 13 deletions

View File

@ -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
^^^^^^^^^^^^^