[all-commits] [llvm/llvm-project] 98ceb4: [mlir] Fix use-after-move issues (#165660)

Slava Gurevich via All-commits all-commits at lists.llvm.org
Thu Oct 30 00:25:32 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 98ceb458f42ed05e2c3e9fb5bc75cd6b1df7a438
      https://github.com/llvm/llvm-project/commit/98ceb458f42ed05e2c3e9fb5bc75cd6b1df7a438
  Author: Slava Gurevich <sgurevich at gmail.com>
  Date:   2025-10-30 (Thu, 30 Oct 2025)

  Changed paths:
    M mlir/lib/Query/Query.cpp
    M mlir/lib/Support/Timing.cpp

  Log Message:
  -----------
  [mlir] Fix use-after-move issues (#165660)

This patch addresses two use-after-move issues:

1. `Timing.cpp` A variable was std::moved and then immediately passed to
an `assert()` check. Since the moved-from state made the assertion
condition trivially true, the check was effectively useless. The
`assert()` is removed.

2. `Query.cpp` The `matcher` object was moved-from and then subsequently
used as if it still retained valid state. The fix ensures no subsequent
use for the moved-from variable.

Testing:
`ninja check-mlir`



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