[clang] [clang] apply clang-tidy's llvm-redundant-casting (NFC) (PR #191322)

via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 9 17:23:58 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 53534 tests passed
* 1084 tests skipped
* 2 tests failed

## Failed Tests
(click on a test name to see its output)

### Clang
<details>
<summary>Clang.Modules/merge-extension-ivars.m</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
rm -rf C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\merge-extension-ivars.m.tmp
# executed command: rm -rf 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\merge-extension-ivars.m.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 3
split-file C:\_work\llvm-project\llvm-project\clang\test\Modules\merge-extension-ivars.m C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\merge-extension-ivars.m.tmp
# executed command: split-file 'C:\_work\llvm-project\llvm-project\clang\test\Modules\merge-extension-ivars.m' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\merge-extension-ivars.m.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 4
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -emit-llvm -o C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\merge-extension-ivars.m.tmp/test-compatible-extensions.ll -fobjc-runtime=macosx-10.9 -FC:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\merge-extension-ivars.m.tmp/Frameworks C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\merge-extension-ivars.m.tmp/test-compatible-extensions.m             -fmodules -fimplicit-module-maps -fmodules-cache-path=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\merge-extension-ivars.m.tmp/modules.cache -fmodule-name=InterfaceAndExtension
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -emit-llvm -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\merge-extension-ivars.m.tmp/test-compatible-extensions.ll' -fobjc-runtime=macosx-10.9 '-FC:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\merge-extension-ivars.m.tmp/Frameworks' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\merge-extension-ivars.m.tmp/test-compatible-extensions.m' -fmodules -fimplicit-module-maps '-fmodules-cache-path=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\merge-extension-ivars.m.tmp/modules.cache' -fmodule-name=InterfaceAndExtension
# .---command stderr------------
# | In module 'Redirecting' imported from C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\merge-extension-ivars.m.tmp/test-compatible-extensions.m:6:
# | In module 'InterfaceAndExtension' imported from C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\merge-extension-ivars.m.tmp/Frameworks/Redirecting.framework\Headers\Redirecting.h:1:
# | C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\merge-extension-ivars.m.tmp/Frameworks/InterfaceAndExtension.framework/Headers/Extension.h:3:9: error: instance variable is already declared
# |     3 |   float ivarInExtension;
# |       |         ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\merge-extension-ivars.m.tmp/Frameworks/InterfaceAndExtension.framework/Headers/Extension.h:3:9: note: previous definition is here
# |     3 |   float ivarInExtension;
# |       |         ^
# | In module 'Redirecting' imported from C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\merge-extension-ivars.m.tmp/test-compatible-extensions.m:6:
# | In module 'InterfaceAndExtension' imported from C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\merge-extension-ivars.m.tmp/Frameworks/Redirecting.framework\Headers\Redirecting.h:1:
# | C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\merge-extension-ivars.m.tmp/Frameworks/InterfaceAndExtension.framework/Headers/Extension.h:4:7: error: instance variable is already declared
# |     4 |   int bitfieldIvarInExtension: 3;
# |       |       ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\merge-extension-ivars.m.tmp/Frameworks/InterfaceAndExtension.framework/Headers/Extension.h:4:7: note: previous definition is here
# |     4 |   int bitfieldIvarInExtension: 3;
# |       |       ^
# | 2 errors generated.
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

### Clang-Unit
<details>
<summary>Clang-Unit._/AllClangUnitTests_exe/StructuralEquivalenceObjCCategoryTest/MatchingIvars</summary>

```
Script:
--
C:\_work\llvm-project\llvm-project\build\tools\clang\unittests\.\AllClangUnitTests.exe --gtest_filter=StructuralEquivalenceObjCCategoryTest.MatchingIvars
--
C:\_work\llvm-project\llvm-project\clang\unittests\AST\StructuralEquivalenceTest.cpp:1246
Value of: testStructuralMatch(t)
  Actual: false
Expected: true


```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/191322


More information about the cfe-commits mailing list