This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG5dee50111c13: [analyzer] Move docs of SmartPtr to correct subcategory (authored by RedDocMD).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110032/new/ https://reviews.llvm.org/D110032 Files: clang/docs/analyzer/checkers.rst Index: clang/docs/analyzer/checkers.rst =================================================================== --- clang/docs/analyzer/checkers.rst +++ clang/docs/analyzer/checkers.rst @@ -1838,6 +1838,20 @@ 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 @@ [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 ^^^^^^^^^^^^^
Index: clang/docs/analyzer/checkers.rst =================================================================== --- clang/docs/analyzer/checkers.rst +++ clang/docs/analyzer/checkers.rst @@ -1838,6 +1838,20 @@ 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 @@ [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 ^^^^^^^^^^^^^
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits