Author: Niels Dekker Date: 2024-12-19T21:16:40+01:00 New Revision: e3b571e632855386908c5cea310f5056d31d6df8
URL: https://github.com/llvm/llvm-project/commit/e3b571e632855386908c5cea310f5056d31d6df8 DIFF: https://github.com/llvm/llvm-project/commit/e3b571e632855386908c5cea310f5056d31d6df8.diff LOG: [clang-tidy][NFC] Sync ContainerSizeEmptyCheck with container-size-empty doc (#118459) Brought the class documentation in sync with the user documentation at container-size-empty.rst: https://github.com/llvm/llvm-project/blob/bfb26202e05ee2932b4368b5fca607df01e8247f/clang-tools-extra/docs/clang-tidy/checks/readability/container-size-empty.rst#L7-L14 Added: Modified: clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.h Removed: ################################################################################ diff --git a/clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.h b/clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.h index acd8a6bfc50f5e..3aa4bdc496194b 100644 --- a/clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.h +++ b/clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.h @@ -18,10 +18,11 @@ namespace clang::tidy::readability { /// a call to `empty()`. /// /// The emptiness of a container should be checked using the `empty()` method -/// instead of the `size()` method. It shows clearer intent to use `empty()`. -/// Furthermore some containers may implement the `empty()` method but not -/// implement the `size()` method. Using `empty()` whenever possible makes it -/// easier to switch to another container in the future. +/// instead of the `size()`/`length()` method. It shows clearer intent to use +/// `empty()`. Furthermore some containers may implement the `empty()` method +/// but not implement the `size()` or `length()` method. Using `empty()` +/// whenever possible makes it easier to switch to another container in the +/// future. class ContainerSizeEmptyCheck : public ClangTidyCheck { public: ContainerSizeEmptyCheck(StringRef Name, ClangTidyContext *Context); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits