[Mlir-commits] [mlir] [MLIR] Fix use-after-move for DEBUG builds, and broken assert logic. (PR #164763)
Slava Gurevich
llvmlistbot at llvm.org
Sat Oct 25 15:36:06 PDT 2025
================
@@ -159,14 +159,19 @@ IterationGraphSorter::IterationGraphSorter(
loop2OutLvl(loop2OutLvl), iterTypes(std::move(iterTypes)),
strategy(strategy) {
----------------
noclowns wrote:
Yes. Although the current naming is correctly LLVM-ish in style, for new code I'd prefer class member variables with an underscore for readability, or at least for the args to not be identically named with the member variables. However, this is existing code, and changing the ctor arg names would have a greater, non-local effect since it would perturb the interface to the existing code, and documentation. Theoretically, the arg names could be diverged between the declaration and the definition, but that's also both a bad practice, and would likely trip clang-tidy. Therefore, I opted for a well-contained local change that has no impact anywhere outside of the ctor body. It's also a rather common pattern used elsewhere in LLVM.
https://github.com/llvm/llvm-project/pull/164763
More information about the Mlir-commits
mailing list