[all-commits] [llvm/llvm-project] 517308: [clang-tidy] Extend readability-container-size-emp...

Aayush Shrivastava via All-commits all-commits at lists.llvm.org
Wed Jun 3 11:56:47 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 517308ad15ee9480edfb9aa6dcc2c628c43da20d
      https://github.com/llvm/llvm-project/commit/517308ad15ee9480edfb9aa6dcc2c628c43da20d
  Author: Aayush Shrivastava <iamaayushrivastava at gmail.com>
  Date:   2026-06-03 (Wed, 03 Jun 2026)

  Changed paths:
    M clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/docs/clang-tidy/checks/readability/container-size-empty.rst
    M clang-tools-extra/test/clang-tidy/checkers/readability/container-size-empty.cpp

  Log Message:
  -----------
  [clang-tidy] Extend readability-container-size-empty to std::size() (#201231)

Fixes #198494

Extend the check to warn when the non-member `std::size()` free function
is used in a boolean context or compared to 0/1, and suggest using
.empty instead.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list