[all-commits] [llvm/llvm-project] 67e05d: [clang-tidy] Fix false negative in readability-con...

Nathan James via All-commits all-commits at lists.llvm.org
Sat Jun 24 07:35:40 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 67e05d380c2253319c22451d340e2e3c2043b6d8
      https://github.com/llvm/llvm-project/commit/67e05d380c2253319c22451d340e2e3c2043b6d8
  Author: Nathan James <n.james93 at hotmail.co.uk>
  Date:   2023-06-24 (Sat, 24 Jun 2023)

  Changed paths:
    M clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStatic.cpp
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/test/clang-tidy/checkers/readability/convert-member-functions-to-static.cpp

  Log Message:
  -----------
  [clang-tidy] Fix false negative in readability-convert-member-functions-to-static

A nested class in a member function can erroneously confuse the check into
thinking that any CXXThisExpr found relate to the outer class, preventing any warnings.
Fix this by not traversing any nested classes.

Fixes https://github.com/llvm/llvm-project/issues/56765

Reviewed By: PiotrZSL

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




More information about the All-commits mailing list