Skip to content

Commit 1e2cb11

Browse files
committed
[clang-tidy] Sync ContainerSizeEmptyCheck with container-size-empty doc
Brought the class documentation in sync with the user documentation at clang-tools-extra/docs/clang-tidy/checks/readability/container-size-empty.rst
1 parent 2526d5b commit 1e2cb11

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)