[clang-tools-extra] [clang-tidy] detect redundant uses of LLVM's cast, dyn_cast (PR #189274)

via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 29 11:44:41 PDT 2026


github-actions[bot] wrote:

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

* 3112 tests passed
* 30 tests skipped
* 1 test failed

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

### Clang Tools
<details>
<summary>Clang Tools.clang-tidy/checkers/llvm/redundant-casting.cpp</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
C:/Python312/python.exe C:/_work/llvm-project/llvm-project/clang-tools-extra/test/../test\clang-tidy\check_clang_tidy.py -std=c++17 C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\llvm\redundant-casting.cpp llvm-redundant-casting C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp
# executed command: C:/Python312/python.exe 'C:/_work/llvm-project/llvm-project/clang-tools-extra/test/../test\clang-tidy\check_clang_tidy.py' -std=c++17 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\llvm\redundant-casting.cpp' llvm-redundant-casting 'C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp'
# .---command stdout------------
# | Running ['clang-tidy', '--experimental-custom-checks', 'C:\\_work\\llvm-project\\llvm-project\\build\\tools\\clang\\tools\\extra\\test\\clang-tidy\\checkers\\llvm\\Output\\redundant-casting.cpp.tmp.cpp', '-fix', '--checks=-*,llvm-redundant-casting', '--config={}', '--', '-std=c++17', '-nostdinc++', '-isystem', 'C:\\_work\\llvm-project\\llvm-project\\clang-tools-extra\\test\\clang-tidy\\checkers\\Inputs\\Headers\\std']...
# | ------------------------ clang-tidy output -----------------------
# | 10 warnings generated.
# | 
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:34:11: warning: redundant use of 'cast' [llvm-redundant-casting]
# |    34 |   A& a1 = llvm::cast<A>(value);
# |       |           ^~~~~~~~~~~~~~~~~~~~
# |       |           value
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:34:11: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:34:25: note: source expression 'value' has type 'A'
# |    34 |   A& a1 = llvm::cast<A>(value);
# |       |                         ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:42:11: warning: redundant use of 'dyn_cast' [llvm-redundant-casting]
# |    42 |   A& a2 = llvm::dyn_cast<A>(value);
# |       |           ^~~~~~~~~~~~~~~~~~~~~~~~
# |       |           value
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:42:11: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:42:29: note: source expression 'value' has type 'A'
# |    42 |   A& a2 = llvm::dyn_cast<A>(value);
# |       |                             ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:50:11: warning: redundant use of 'cast_or_null' [llvm-redundant-casting]
# |    50 |   A& a3 = llvm::cast_or_null<A>(value);
# |       |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |       |           value
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:50:11: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:50:33: note: source expression 'value' has type 'A'
# |    50 |   A& a3 = llvm::cast_or_null<A>(value);
# |       |                                 ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:58:11: warning: redundant use of 'cast_if_present' [llvm-redundant-casting]
# |    58 |   A& a4 = llvm::cast_if_present<A>(value);
# |       |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |       |           value
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:58:11: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:58:36: note: source expression 'value' has type 'A'
# |    58 |   A& a4 = llvm::cast_if_present<A>(value);
# |       |                                    ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:66:11: warning: redundant use of 'dyn_cast_or_null' [llvm-redundant-casting]
# |    66 |   A& a5 = llvm::dyn_cast_or_null<A>(value);
# |       |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |       |           value
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:66:11: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:66:37: note: source expression 'value' has type 'A'
# |    66 |   A& a5 = llvm::dyn_cast_or_null<A>(value);
# |       |                                     ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:74:11: warning: redundant use of 'dyn_cast_if_present' [llvm-redundant-casting]
# |    74 |   A& a6 = llvm::dyn_cast_if_present<A>(value);
# |       |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |       |           value
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:74:11: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:74:40: note: source expression 'value' has type 'A'
# |    74 |   A& a6 = llvm::dyn_cast_if_present<A>(value);
# |       |                                        ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:82:11: warning: redundant use of 'cast' [llvm-redundant-casting]
# |    82 |   A& a7 = llvm::cast<A>((getA()));
# |       |           ^~~~~~~~~~~~~~~~~~~~~~~
# |       |           (getA())
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:82:11: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:82:25: note: source expression '(getA())' has type 'A'
# |    82 |   A& a7 = llvm::cast<A>((getA()));
# |       |                         ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:90:11: warning: redundant use of 'cast' [llvm-redundant-casting]
# |    90 |   A& a8 = llvm::cast<A>(value);
# |       |           ^~~~~~~~~~~~~~~~~~~~
# |       |           value
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:90:11: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:90:25: note: source expression 'value' has type 'B'
# |    90 |   A& a8 = llvm::cast<A>(value);
# |       |                         ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:90:25: note: 'B' is a subtype of 'A'
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:107:12: warning: redundant use of 'cast' [llvm-redundant-casting]
# |   107 |   A& a11 = cast<A>(value);
# |       |            ^~~~~~~~~~~~~~
# |       |            value
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:107:12: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:107:20: note: source expression 'value' has type 'A'
# |   107 |   A& a11 = cast<A>(value);
# |       |                    ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:116:12: warning: redundant use of 'cast' [llvm-redundant-casting]
# |   116 |   A *a12 = llvm::cast<A>(value);
# |       |            ^~~~~~~~~~~~~~~~~~~~
# |       |            value
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:116:12: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:116:26: note: source expression 'value' has type 'A *'
# | clang-tidy applied 10 of 10 suggested fixes.
# | 
# |   116 |   A *a12 = llvm::cast<A>(value);
# |       |                          ^
# | 
# | ------------------------------------------------------------------
# | diff -u C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.orig C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp failed:
# | --- C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.orig	2026-03-29 18:43:48.947408100 +0000
# | +++ C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp	2026-03-29 18:43:49.002764800 +0000
# | @@ -31,7 +31,7 @@
# |  A &getA();
# | 
# |  
# | 
# |  void testCast(A& value) {
# | 
# | -  A& a1 = llvm::cast<A>(value);
# | 
# | +  A& a1 = value;
# | 
# |    //
# | 
# |    //
# | 
# |    //
# | 
# | @@ -39,7 +39,7 @@
# |  }
# | 
# |  
# | 
# |  void testDynCast(A& value) {
# | 
# | -  A& a2 = llvm::dyn_cast<A>(value);
# | 
# | +  A& a2 = value;
# | 
# |    //
# | 
# |    //
# | 
# |    //
# | 
# | @@ -47,7 +47,7 @@
# |  }
# | 
# |  
# | 
# |  void testCastOrNull(A& value) {
# | 
# | -  A& a3 = llvm::cast_or_null<A>(value);
# | 
# | +  A& a3 = value;
# | 
# |    //
# | 
# |    //
# | 
# |    //
# | 
# | @@ -55,7 +55,7 @@
# |  }
# | 
# |  
# | 
# |  void testCastIfPresent(A& value) {
# | 
# | -  A& a4 = llvm::cast_if_present<A>(value);
# | 
# | +  A& a4 = value;
# | 
# |    //
# | 
# |    //
# | 
# |    //
# | 
# | @@ -63,7 +63,7 @@
# |  }
# | 
# |  
# | 
# |  void testDynCastOrNull(A& value) {
# | 
# | -  A& a5 = llvm::dyn_cast_or_null<A>(value);
# | 
# | +  A& a5 = value;
# | 
# |    //
# | 
# |    //
# | 
# |    //
# | 
# | @@ -71,7 +71,7 @@
# |  }
# | 
# |  
# | 
# |  void testDynCastIfPresent(A& value) {
# | 
# | -  A& a6 = llvm::dyn_cast_if_present<A>(value);
# | 
# | +  A& a6 = value;
# | 
# |    //
# | 
# |    //
# | 
# |    //
# | 
# | @@ -79,7 +79,7 @@
# |  }
# | 
# |  
# | 
# |  void testCastNonDeclRef() {
# | 
# | -  A& a7 = llvm::cast<A>((getA()));
# | 
# | +  A& a7 = (getA());
# | 
# |    //
# | 
# |    //
# | 
# |    //
# | 
# | @@ -87,7 +87,7 @@
# |  }
# | 
# |  
# | 
# |  void testUpcast(B& value) {
# | 
# | -  A& a8 = llvm::cast<A>(value);
# | 
# | +  A& a8 = value;
# | 
# |    //
# | 
# |    //
# | 
# |    //
# | 
# | @@ -104,7 +104,7 @@
# |  
# | 
# |  namespace llvm {
# | 
# |  void testCastInLLVM(A& value) {
# | 
# | -  A& a11 = cast<A>(value);
# | 
# | +  A& a11 = value;
# | 
# |    //
# | 
# |    //
# | 
# |    //
# | 
# | @@ -113,7 +113,7 @@
# |  } // namespace llvm
# | 
# |  
# | 
# |  void testCastPointer(A* value) {
# | 
# | -  A *a12 = llvm::cast<A>(value);
# | 
# | +  A *a12 = value;
# | 
# |    //
# | 
# |    //
# | 
# |    //
# | 
# | 
# | ------------------------------ Fixes -----------------------------
# | --- C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.orig	2026-03-29 18:43:48.947408100 +0000
# | +++ C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp	2026-03-29 18:43:49.002764800 +0000
# | @@ -31,7 +31,7 @@
# |  A &getA();
# | 
# |  
# | 
# |  void testCast(A& value) {
# | 
# | -  A& a1 = llvm::cast<A>(value);
# | 
# | +  A& a1 = value;
# | 
# |    //
# | 
# |    //
# | 
# |    //
# | 
# | @@ -39,7 +39,7 @@
# |  }
# | 
# |  
# | 
# |  void testDynCast(A& value) {
# | 
# | -  A& a2 = llvm::dyn_cast<A>(value);
# | 
# | +  A& a2 = value;
# | 
# |    //
# | 
# |    //
# | 
# |    //
# | 
# | @@ -47,7 +47,7 @@
# |  }
# | 
# |  
# | 
# |  void testCastOrNull(A& value) {
# | 
# | -  A& a3 = llvm::cast_or_null<A>(value);
# | 
# | +  A& a3 = value;
# | 
# |    //
# | 
# |    //
# | 
# |    //
# | 
# | @@ -55,7 +55,7 @@
# |  }
# | 
# |  
# | 
# |  void testCastIfPresent(A& value) {
# | 
# | -  A& a4 = llvm::cast_if_present<A>(value);
# | 
# | +  A& a4 = value;
# | 
# |    //
# | 
# |    //
# | 
# |    //
# | 
# | @@ -63,7 +63,7 @@
# |  }
# | 
# |  
# | 
# |  void testDynCastOrNull(A& value) {
# | 
# | -  A& a5 = llvm::dyn_cast_or_null<A>(value);
# | 
# | +  A& a5 = value;
# | 
# |    //
# | 
# |    //
# | 
# |    //
# | 
# | @@ -71,7 +71,7 @@
# |  }
# | 
# |  
# | 
# |  void testDynCastIfPresent(A& value) {
# | 
# | -  A& a6 = llvm::dyn_cast_if_present<A>(value);
# | 
# | +  A& a6 = value;
# | 
# |    //
# | 
# |    //
# | 
# |    //
# | 
# | @@ -79,7 +79,7 @@
# |  }
# | 
# |  
# | 
# |  void testCastNonDeclRef() {
# | 
# | -  A& a7 = llvm::cast<A>((getA()));
# | 
# | +  A& a7 = (getA());
# | 
# |    //
# | 
# |    //
# | 
# |    //
# | 
# | @@ -87,7 +87,7 @@
# |  }
# | 
# |  
# | 
# |  void testUpcast(B& value) {
# | 
# | -  A& a8 = llvm::cast<A>(value);
# | 
# | +  A& a8 = value;
# | 
# |    //
# | 
# |    //
# | 
# |    //
# | 
# | @@ -104,7 +104,7 @@
# |  
# | 
# |  namespace llvm {
# | 
# |  void testCastInLLVM(A& value) {
# | 
# | -  A& a11 = cast<A>(value);
# | 
# | +  A& a11 = value;
# | 
# |    //
# | 
# |    //
# | 
# |    //
# | 
# | @@ -113,7 +113,7 @@
# |  } // namespace llvm
# | 
# |  
# | 
# |  void testCastPointer(A* value) {
# | 
# | -  A *a12 = llvm::cast<A>(value);
# | 
# | +  A *a12 = value;
# | 
# |    //
# | 
# |    //
# | 
# |    //
# | 
# | 
# | ------------------------------------------------------------------
# | FileCheck --input-file=C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\llvm\redundant-casting.cpp --check-prefixes=CHECK-FIXES --match-full-lines failed:
# | C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\llvm\redundant-casting.cpp:151:18: error: CHECK-FIXES: expected string not found in input
# | 
# |  // CHECK-FIXES: T *a15 = value;
# | 
# |                  ^
# | 
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:116:17: note: scanning from here
# | 
# |  A *a12 = value;
# | 
# |                 ^
# | 
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp:124:26: note: possible intended match here
# | 
# | void testCastTemplateIgnore(T* value) {
# | 
# |                          ^
# | 
# | 
# | 
# | Input file: C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\redundant-casting.cpp.tmp.cpp
# | 
# | Check file: C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\llvm\redundant-casting.cpp
# | 
# | 
# | 
# | -dump-input=help explains the following input dump.
# | 
# | 
# | 
# | Input was:
# | 
# | <<<<<<
# | 
# |              .
# | 
# |              .
# | 
# |              .
# | 
# |            111:  (void)a11; 
# | 
# |            112: } 
# | 
# |            113: } // namespace llvm 
# | 
# |            114:  
# | 
# |            115: void testCastPointer(A* value) { 
# | 
# |            116:  A *a12 = value; 
# | 
# | check:151'0                     X error: no match found
# | 
# |            117:  // 
# | 
# | check:151'0     ~~~~
# | 
# |            118:  // 
# | 
# | check:151'0     ~~~~
# | 
# |            119:  // 
# | 
# | check:151'0     ~~~~
# | 
# |            120:  (void)a12; 
# | 
# | check:151'0     ~~~~~~~~~~~~
# | 
# |            121: } 
# | 
# | check:151'0     ~~
# | 
# |            122:  
# | 
# | check:151'0     ~
# | 
# |            123: template <typename T> 
# | 
# | check:151'0     ~~~~~~~~~~~~~~~~~~~~~~
# | 
# |            124: void testCastTemplateIgnore(T* value) { 
# | 
# | check:151'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 
# | check:151'1                              ?               possible intended match
# | 
# |            125:  A *a13 = llvm::cast<A>(value); 
# | 
# | check:151'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 
# |            126:  // 
# | 
# | check:151'0     ~~~~
# | 
# |            127:  // 
# | 
# | check:151'0     ~~~~
# | 
# |            128:  (void)a13; 
# | 
# | check:151'0     ~~~~~~~~~~~~
# | 
# |            129: } 
# | 
# | check:151'0     ~~
# | 
# |              .
# | 
# |              .
# | 
# |              .
# | 
# | >>>>>>
# | 
# | 
# `-----------------------------
# .---command stderr------------
# | Traceback (most recent call last):
# |   File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 554, in <module>
# |     main()
# |   File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 550, in main
# |     CheckRunner(args, extra_args).run()
# |   File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 432, in run
# |     self.check_fixes()
# |   File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 327, in check_fixes
# |     try_run(
# |   File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 64, in try_run
# |     process_output = subprocess.check_output(args, stderr=subprocess.STDOUT).decode(
# |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# |   File "c:\python312\Lib\subprocess.py", line 466, in check_output
# |     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
# |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# |   File "c:\python312\Lib\subprocess.py", line 571, in run
# |     raise CalledProcessError(retcode, process.args,
# | subprocess.CalledProcessError: Command '['FileCheck', '--input-file=C:\\_work\\llvm-project\\llvm-project\\build\\tools\\clang\\tools\\extra\\test\\clang-tidy\\checkers\\llvm\\Output\\redundant-casting.cpp.tmp.cpp', 'C:\\_work\\llvm-project\\llvm-project\\clang-tools-extra\\test\\clang-tidy\\checkers\\llvm\\redundant-casting.cpp', '--check-prefixes=CHECK-FIXES', '--match-full-lines']' returned non-zero exit status 1.
# `-----------------------------
# error: command failed with exit status: 1

--

```
</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/189274


More information about the cfe-commits mailing list