forked from OSchip/llvm-project
[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:
parent
f988f68064
commit
5dee50111c
|
@ -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
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
|
|
Loading…
Reference in New Issue