[Mlir-commits] [clang-tools-extra] [mlir] [clang-tidy][mlir] Add check for passing value type by reference. (PR #179882)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Feb 5 00:29:22 PST 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 6493 tests passed
* 442 tests skipped
* 2 tests failed
## Failed Tests
(click on a test name to see its output)
### MLIR
<details>
<summary>MLIR.Dialect/SCF/parallel-loop-fusion.mlir</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe -allow-unregistered-dialect C:\_work\llvm-project\llvm-project\mlir\test\Dialect\SCF\parallel-loop-fusion.mlir -pass-pipeline='builtin.module(func.func(scf-parallel-loop-fusion))' -split-input-file | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\mlir\test\Dialect\SCF\parallel-loop-fusion.mlir
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe' -allow-unregistered-dialect 'C:\_work\llvm-project\llvm-project\mlir\test\Dialect\SCF\parallel-loop-fusion.mlir' '-pass-pipeline=builtin.module(func.func(scf-parallel-loop-fusion))' -split-input-file
# .---command stderr------------
# | Assertion failed: !region.empty() && "unexpected empty region", file C:\_work\llvm-project\llvm-project\mlir\include\mlir/IR/OpDefinition.h, line 907
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
# | Stack dump:
# | 0. Program arguments: c:\\_work\\llvm-project\\llvm-project\\build\\bin\\mlir-opt.exe -allow-unregistered-dialect C:\\_work\\llvm-project\\llvm-project\\mlir\\test\\Dialect\\SCF\\parallel-loop-fusion.mlir -pass-pipeline=builtin.module(func.func(scf-parallel-loop-fusion)) -split-input-file
# | Exception Code: 0xC000001D
# | #0 0x00007ff74234ba56 mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x305ba56)
# | #1 0x00007ffaa109bb04 (C:\Windows\System32\ucrtbase.dll+0x7bb04)
# | #2 0x00007ffaa109cad1 (C:\Windows\System32\ucrtbase.dll+0x7cad1)
# | #3 0x00007ffaa109e4a1 (C:\Windows\System32\ucrtbase.dll+0x7e4a1)
# | #4 0x00007ffaa109e6e1 (C:\Windows\System32\ucrtbase.dll+0x7e6e1)
# | #5 0x00007ff7414d72ba mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x21e72ba)
# | #6 0x00007ff7414db888 mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x21eb888)
# | #7 0x00007ff73f315929 (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x25929)
# | #8 0x00007ff7414db709 mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x21eb709)
# | #9 0x00007ff73f66bf5f (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x37bf5f)
# | #10 0x00007ff73f66c976 (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x37c976)
# | #11 0x00007ff73f66f862 (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x37f862)
# | #12 0x00007ff73f66bd14 (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x37bd14)
# | #13 0x00007ff73f66c976 (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x37c976)
# | #14 0x00007ff73f674176 (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x384176)
# | #15 0x00007ff73f6738a3 (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x3838a3)
# | #16 0x00007ff73f2ff812 (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0xf812)
# | #17 0x00007ff73f2fea5a (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0xea5a)
# | #18 0x00007ff73f65b570 (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x36b570)
# | #19 0x00007ff73f65b1e9 (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x36b1e9)
# | #20 0x00007ff73f2f358e (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x358e)
# | #21 0x00007ff73f2f393c (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x393c)
# | #22 0x00007ff73f2f3c9b (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x3c9b)
# | #23 0x00007ff73f2f145a (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x145a)
# | #24 0x00007ff746b37c10 mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x7847c10)
# | #25 0x00007ffaa9734cb0 (C:\Windows\System32\KERNEL32.DLL+0x14cb0)
# | #26 0x00007ffab543edcb (C:\Windows\SYSTEM32\ntdll.dll+0x7edcb)
# `-----------------------------
# error: command failed with exit status: 0xc000001d
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\mlir\test\Dialect\SCF\parallel-loop-fusion.mlir'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\mlir\test\Dialect\SCF\parallel-loop-fusion.mlir:127:17: error: CHECK-LABEL: expected string not found in input
# | // CHECK-LABEL: func @fuse_three
# | ^
# | <stdin>:29:21: note: scanning from here
# | func.func @fuse_two(%arg0: memref<2x2xf32>, %arg1: memref<2x2xf32>) {
# | ^
# | <stdin>:43:2: note: possible intended match here
# | scf.reduce
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\mlir\test\Dialect\SCF\parallel-loop-fusion.mlir
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 24: }
# | 25: }
# | 26:
# | 27: // -----
# | 28: module {
# | 29: func.func @fuse_two(%arg0: memref<2x2xf32>, %arg1: memref<2x2xf32>) {
# | label:127'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | 30: %c2 = arith.constant 2 : index
# | label:127'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 31: %c0 = arith.constant 0 : index
# | label:127'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 32: %c1 = arith.constant 1 : index
# | label:127'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 33: %cst = arith.constant 1.000000e+00 : f32
# | label:127'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 34: %alloc = memref.alloc() : memref<2x2xf32>
# | label:127'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 38: memref.store %1, %alloc[%arg2, %arg3] : memref<2x2xf32>
# | label:127'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 39: %2 = memref.load %alloc[%arg2, %arg3] : memref<2x2xf32>
# | label:127'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 40: %3 = memref.load %arg0[%arg2, %arg3] : memref<2x2xf32>
# | label:127'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 41: %4 = arith.mulf %2, %3 : f32
# | label:127'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 42: memref.store %4, %arg1[%arg2, %arg3] : memref<2x2xf32>
# | label:127'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 43: scf.reduce
# | label:127'0 ~~~~~~~~~~~~~
# | label:127'1 ? possible intended match
# | 44: }
# | label:127'0 ~~~
# | 45: memref.dealloc %alloc : memref<2x2xf32>
# | label:127'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 46: return
# | label:127'0 ~~~~~~~~
# | 47: }
# | label:127'0 ~~~
# | 48: }
# | label:127'0 ~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
### Clang Tools
<details>
<summary>Clang Tools.clang-tidy/infrastructure/alphabetical-order.test</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\clang-tidy\infrastructure/../../../clang-tidy/tool/check_alphabetical_order.py -o C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.clang-tidy-checks-list.rst
# executed command: C:/Python312/python.exe 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../clang-tidy/tool/check_alphabetical_order.py' -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.clang-tidy-checks-list.rst'
# note: command had no output on stdout or stderr
# RUN: at line 2
diff --strip-trailing-cr C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../docs/clang-tidy/checks/list.rst C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.clang-tidy-checks-list.rst
# executed command: diff --strip-trailing-cr 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../docs/clang-tidy/checks/list.rst' 'C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.clang-tidy-checks-list.rst'
# note: command had no output on stdout or stderr
# RUN: at line 4
C:/Python312/python.exe C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../clang-tidy/tool/check_alphabetical_order.py -o C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.ReleaseNotes.rst
# executed command: C:/Python312/python.exe 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../clang-tidy/tool/check_alphabetical_order.py' -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.ReleaseNotes.rst'
# .---command stderr------------
# |
# | Entries in 'clang-tools-extra/docs/ReleaseNotes.rst' are not alphabetically sorted.
# | Fix the ordering by applying diff printed below.
# |
# `-----------------------------
# RUN: at line 5
diff --strip-trailing-cr C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../docs/ReleaseNotes.rst C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.ReleaseNotes.rst
# executed command: diff --strip-trailing-cr 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../docs/ReleaseNotes.rst' 'C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.ReleaseNotes.rst'
# .---command stdout------------
# | *** C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../docs/ReleaseNotes.rst
# | --- C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.ReleaseNotes.rst
# | ***************
# | *** 97,107 ****
# | New checks
# | ^^^^^^^^^^
# |
# | - - New :doc:`avoid-passing-mlir-op-as-ref`
# | - <clang-tidy/checks/llvm/avoid-passing-mlir-op-as-ref>` check.
# | -
# | - Finds cases where ``mlir::Op`` derived classes are passed by reference.
# | -
# | - New :doc:`llvm-type-switch-case-types
# | <clang-tidy/checks/llvm/type-switch-case-types>` check.
# |
# | --- 97,102 ----
# | ***************
# | *** 139,144 ****
# | --- 134,144 ----
# | Checks for presence or absence of trailing commas in enum definitions and
# | initializer lists.
# |
# | + - New :doc:`avoid-passing-mlir-op-as-ref`
# | + <clang-tidy/checks/llvm/avoid-passing-mlir-op-as-ref>` check.
# | +
# | + Finds cases where ``mlir::Op`` derived classes are passed by reference.
# | +
# | New check aliases
# | ^^^^^^^^^^^^^^^^^
# |
# `-----------------------------
# 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/179882
More information about the Mlir-commits
mailing list