[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
This commit is contained in:
Balazs Benics 2022-03-13 17:51:00 +01:00
parent d2baefae68
commit 200e7a8470
1 changed files with 5 additions and 0 deletions

View File

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