[all-commits] [llvm/llvm-project] ec3f8f: [Clang-Tidy] Empty Check

abrahamcd via All-commits all-commits at lists.llvm.org
Fri Dec 9 15:21:29 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ec3f8feddf81f2868c840f8e9af8587f055c713c
      https://github.com/llvm/llvm-project/commit/ec3f8feddf81f2868c840f8e9af8587f055c713c
  Author: Abraham Corea Diaz <abrahamcd at google.com>
  Date:   2022-12-09 (Fri, 09 Dec 2022)

  Changed paths:
    M clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
    M clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt
    A clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp
    A clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.h
    M clang-tools-extra/docs/ReleaseNotes.rst
    A clang-tools-extra/docs/clang-tidy/checks/bugprone/standalone-empty.rst
    M clang-tools-extra/docs/clang-tidy/checks/list.rst
    A clang-tools-extra/test/clang-tidy/checkers/bugprone/standalone-empty.cpp

  Log Message:
  -----------
  [Clang-Tidy] Empty Check

Adds a clang-tidy check for the incorrect use of `empty()` on a
container when the result of the call is ignored.

Authored-by: Abraham Corea Diaz <abrahamcd at google.com>
Co-authored-by: Denis Nikitin <denik at google.com>

Reviewed By: cjdb

Differential Revision: https://reviews.llvm.org/D128372




More information about the All-commits mailing list