Index: clang-tools-extra/docs/clang-tidy/checks/bugprone-shared-ptr-array-mismatch.rst =================================================================== --- clang-tools-extra/docs/clang-tidy/checks/bugprone-shared-ptr-array-mismatch.rst +++ clang-tools-extra/docs/clang-tidy/checks/bugprone-shared-ptr-array-mismatch.rst @@ -29,3 +29,8 @@ std::shared_ptr 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 corresponds to the CERT C++ Coding Standard rule +`MEM51-CPP. Properly deallocate dynamically allocated resources +`_ +rule, but only partially implements it. Index: clang-tools-extra/docs/clang-tidy/checks/cert-mem51-cpp.rst =================================================================== --- /dev/null +++ clang-tools-extra/docs/clang-tidy/checks/cert-mem51-cpp.rst @@ -0,0 +1,12 @@ +.. title:: clang-tidy - cert-mem51-cpp +.. meta:: + :http-equiv=refresh: 5;URL=bugprone-shared-ptr-array-mismatch.html + +cert-mem51-cpp +============== + +The cert-mem51-cpp check is an alias, please see +`bugprone-shared-ptr-array-mismatch `_ +for more information. + +Please note that the check only partially covers the corresponding CERT rule. Index: clang-tools-extra/docs/clang-tidy/checks/list.rst =================================================================== --- clang-tools-extra/docs/clang-tidy/checks/list.rst +++ clang-tools-extra/docs/clang-tidy/checks/list.rst @@ -350,6 +350,7 @@ `cert-exp42-c `_, `bugprone-suspicious-memory-comparison `_, `cert-fio38-c `_, `misc-non-copyable-objects `_, `cert-flp37-c `_, `bugprone-suspicious-memory-comparison `_, + `cert-mem51-cpp `_, `bugprone-shared-ptr-array-mismatch `_, "Yes" `cert-msc30-c `_, `cert-msc50-cpp `_, `cert-msc32-c `_, `cert-msc51-cpp `_, `cert-oop11-cpp `_, `performance-move-constructor-init `_,