steakhal updated this revision to Diff 414337. steakhal retitled this revision from "[clang-tidy][docs][NFC] Add alias cert-mem51-cpp to bugprone-shared-ptr-array-mismatch" to "[clang-tidy][docs][NFC] Refer to the CERT rule in bugprone-shared-ptr-array-mismatch docs". steakhal added a comment.
Removed all the check alias stuff; preserved only the docs part. Reworded the docs to put emphasis on the implementation limitations. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121214/new/ https://reviews.llvm.org/D121214 Files: clang-tools-extra/docs/clang-tidy/checks/bugprone-shared-ptr-array-mismatch.rst 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<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.
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<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.
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits