[clang-tools-extra] 200e7a8 - [clang-tidy][docs][NFC] Refer to the CERT rule in bugprone-shared-ptr-array-mismatch docs

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 13 09:51:32 PDT 2022


Author: Balazs Benics
Date: 2022-03-13T17:51:00+01:00
New Revision: 200e7a84701257afe80fd0b168fef78cf29aa523

URL: https://github.com/llvm/llvm-project/commit/200e7a84701257afe80fd0b168fef78cf29aa523
DIFF: https://github.com/llvm/llvm-project/commit/200e7a84701257afe80fd0b168fef78cf29aa523.diff

LOG: [clang-tidy][docs][NFC] Refer to the CERT rule in bugprone-shared-ptr-array-mismatch docs

Document the connection between this checker and the corresponding CERT
rule.

Reviewed By: aaron.ballman

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

Added: 
    

Modified: 
    clang-tools-extra/docs/clang-tidy/checks/bugprone-shared-ptr-array-mismatch.rst

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone-shared-ptr-array-mismatch.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone-shared-ptr-array-mismatch.rst
index d15c28272d697..0833195edbb79 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/bugprone-shared-ptr-array-mismatch.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone-shared-ptr-array-mismatch.rst
@@ -29,3 +29,8 @@ Example:
     std::shared_ptr<Foo> x(new Foo[10]); // no replacement in this case
     //                     ^ warning: shared pointer to non-array is initialized with array [bugprone-shared-ptr-array-mismatch]
   };
+
+This check partially covers the CERT C++ Coding Standard rule
+`MEM51-CPP. Properly deallocate dynamically allocated resources
+<https://wiki.sei.cmu.edu/confluence/display/cplusplus/MEM51-CPP.+Properly+deallocate+dynamically+allocated+resources>`_
+However, only the ``std::shared_ptr`` case is detected by this check.


        


More information about the cfe-commits mailing list