[all-commits] [llvm/llvm-project] 430e1b: [clang-tidy] detect redundant uses of LLVM's cast, ...

Henrik G. Olsson via All-commits all-commits at lists.llvm.org
Wed Apr 8 09:54:26 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 430e1be254f90d177e997266bc1c2e700e16d1cc
      https://github.com/llvm/llvm-project/commit/430e1be254f90d177e997266bc1c2e700e16d1cc
  Author: Henrik G. Olsson <hnrklssn at gmail.com>
  Date:   2026-04-08 (Wed, 08 Apr 2026)

  Changed paths:
    M clang-tools-extra/clang-tidy/llvm/CMakeLists.txt
    M clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp
    A clang-tools-extra/clang-tidy/llvm/RedundantCastingCheck.cpp
    A clang-tools-extra/clang-tidy/llvm/RedundantCastingCheck.h
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/docs/clang-tidy/checks/list.rst
    A clang-tools-extra/docs/clang-tidy/checks/llvm/redundant-casting.rst
    A clang-tools-extra/test/clang-tidy/checkers/llvm/redundant-casting.cpp
    M clang/include/clang/ASTMatchers/ASTMatchers.h
    M clang/include/clang/ASTMatchers/ASTMatchersInternal.h

  Log Message:
  -----------
  [clang-tidy] detect redundant uses of LLVM's cast, dyn_cast (#189274)

Warns when casting to the same pointee type, or when the target pointee
type is a super type of the argument's pointee type. Supported
functions:
 - cast
 - cast_if_present
 - cast_or_null
 - dyn_cast
 - dyn_cast_if_present
 - dyn_cast_or_null

---------

Co-authored-by: Victor Chernyakin <chernyakin.victor.j at outlook.com>



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