Skip to content

Commit e3b571e

Browse files
authored
[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
1 parent 45c01e8 commit e3b571e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ namespace clang::tidy::readability {
1818
/// a call to `empty()`.
1919
///
2020
/// The emptiness of a container should be checked using the `empty()` method
21-
/// instead of the `size()` method. It shows clearer intent to use `empty()`.
22-
/// Furthermore some containers may implement the `empty()` method but not
23-
/// implement the `size()` method. Using `empty()` whenever possible makes it
24-
/// easier to switch to another container in the future.
21+
/// instead of the `size()`/`length()` method. It shows clearer intent to use
22+
/// `empty()`. Furthermore some containers may implement the `empty()` method
23+
/// but not implement the `size()` or `length()` method. Using `empty()`
24+
/// whenever possible makes it easier to switch to another container in the
25+
/// future.
2526
class ContainerSizeEmptyCheck : public ClangTidyCheck {
2627
public:
2728
ContainerSizeEmptyCheck(StringRef Name, ClangTidyContext *Context);

0 commit comments

Comments
 (0)