)]}'
{
  "commit": "b14eb2fc0db35080e6da8df26e329e70ebae4552",
  "tree": "112a98979fd8c2724aabd262323455d739728787",
  "parents": [
    "52fbf34e35194d05951dfd76a45cc886cf3e4ba5"
  ],
  "author": {
    "name": "jumerckx",
    "email": "31353884+jumerckx@users.noreply.github.com",
    "time": "Fri May 08 16:32:54 2026 +0200"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri May 08 07:32:54 2026 -0700"
  },
  "message": "[mlir] Fix C++ name hiding bug in PDLPatternMatch for Op classes (#195554)\n\nNative constraints with a named operation operand type failed because of\nname hiding in `ProcessPDLValue`.\ni.e. previously a constraint like:\n```\nConstraint TestConstraintWithNamedOpOperand(testOp: Op\u003ctest.op_a\u003e) [{\n    return success();\n}];\n```\nwould fail with:\n```\nIn file included from /home/jumerckx/llvm-project/mlir/include/mlir/IR/PatternMatch.h:814,\n                 from /home/jumerckx/llvm-project/mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h:13,\n                 from /home/jumerckx/llvm-project/mlir/include/mlir/Dialect/Bufferization/IR/Bufferization.h:14,\n                 from /home/jumerckx/llvm-project/mlir/test/lib/Tools/PDLL/../../Dialect/Test/TestDialect.h:21,\n                 from /home/jumerckx/llvm-project/mlir/test/lib/Tools/PDLL/TestPDLL.cpp:9:\n/home/jumerckx/llvm-project/mlir/include/mlir/IR/PDLPatternMatch.h.inc: In instantiation of ‘typename FnTraitsT::result_t mlir::detail::pdl_function_builder::processArgsAndInvokeConstraint(PDLFnT\u0026, mlir::PatternRewriter\u0026, llvm::ArrayRef\u003cmlir::PDLValue\u003e, std::index_sequence\u003cInputIndexes ...\u003e) [with PDLFnT \u003d llvm::LogicalResult (* const)(mlir::PatternRewriter\u0026, test::OpA); long unsigned int ...I \u003d {0}; FnTraitsT \u003d llvm::function_traits\u003cllvm::LogicalResult (* const)(mlir::PatternRewriter\u0026, test::OpA), false\u003e; typename FnTraitsT::result_t \u003d llvm::LogicalResult; std::index_sequence\u003cInputIndexes ...\u003e \u003d std::integer_sequence\u003clong unsigned int, 0\u003e]’:\n/home/jumerckx/llvm-project/mlir/include/mlir/IR/PDLPatternMatch.h.inc:733:42:   required from ‘std::enable_if_t\u003c(! std::is_convertible\u003cConstraintFnT, std::function\u003cllvm::LogicalResult(mlir::PatternRewriter\u0026, mlir::PDLResultList\u0026, llvm::ArrayRef\u003cmlir::PDLValue\u003e)\u003e \u003e::value), std::function\u003cllvm::LogicalResult(mlir::PatternRewriter\u0026, mlir::PDLResultList\u0026, llvm::ArrayRef\u003cmlir::PDLValue\u003e)\u003e \u003e mlir::detail::pdl_function_builder::buildConstraintFn(ConstraintFnT\u0026\u0026) [with ConstraintFnT \u003d llvm::LogicalResult (\u0026)(mlir::PatternRewriter\u0026, test::OpA); std::enable_if_t\u003c(! std::is_convertible\u003cConstraintFnT, std::function\u003cllvm::LogicalResult(mlir::PatternRewriter\u0026, mlir::PDLResultList\u0026, llvm::ArrayRef\u003cmlir::PDLValue\u003e)\u003e \u003e::value), std::function\u003cllvm::LogicalResult(mlir::PatternRewriter\u0026, mlir::PDLResultList\u0026, llvm::ArrayRef\u003cmlir::PDLValue\u003e)\u003e \u003e \u003d std::function\u003cllvm::LogicalResult(mlir::PatternRewriter\u0026, mlir::PDLResultList\u0026, llvm::ArrayRef\u003cmlir::PDLValue\u003e)\u003e]’\n/home/jumerckx/llvm-project/mlir/include/mlir/IR/PDLPatternMatch.h.inc:868:79:   required from ‘void mlir::PDLPatternModule::registerConstraintFunction(llvm::StringRef, ConstraintFnT\u0026\u0026) [with ConstraintFnT \u003d llvm::LogicalResult (\u0026)(mlir::PatternRewriter\u0026, test::OpA)]’\n/home/jumerckx/llvm-project/build/tools/mlir/test/lib/Tools/PDLL/TestPDLLPatterns.h.inc:64:31:   required from ‘{anonymous}::GeneratedPDLLPattern0::GeneratedPDLLPattern0(mlir::MLIRContext*, ConfigsT\u0026\u0026 ...) [with ConfigsT \u003d {}]’\n/home/jumerckx/llvm-project/mlir/include/mlir/IR/PatternMatch.h:1017:25:   required from ‘std::enable_if_t\u003cstd::is_base_of\u003cmlir::PDLPatternModule, T\u003e::value\u003e mlir::RewritePatternSet:addImpl(llvm::ArrayRef\u003cllvm::StringRef\u003e, Args\u0026\u0026 ...) [with T \u003d {anonymous}::GeneratedPDLLPattern0; Args \u003d {mlir::MLIRContext*}; std::enable_if_t\u003cstd::is_base_of\u003cmlir::PDLPatternModule, T\u003e::value\u003e \u003d void]’\n/home/jumerckx/llvm-project/mlir/include/mlir/IR/PatternMatch.h:864:17:   required from ‘mlir::RewritePatternSet\u0026 mlir::RewritePatternSet::add(ConstructorArg\u0026\u0026, ConstructorArgs\u0026\u0026 ...) [with Ts \u003d {{anonymous}::GeneratedPDLLPattern0}; ConstructorArg \u003d mlir::MLIRContext*; ConstructorArgs \u003d {}; \u003ctemplate-parameter-1-4\u003e \u003d void]’\n/home/jumerckx/llvm-project/build/tools/mlir/test/lib/Tools/PDLL/TestPDLLPatterns.h.inc:74:38:   required from ‘void populateGeneratedPDLLPatterns(mlir::RewritePatternSet\u0026, ConfigsT\u0026\u0026 ...) [with ConfigsT \u003d {}]’\n/home/jumerckx/llvm-project/mlir/test/lib/Tools/PDLL/TestPDLL.cpp:36:34:   required from here\n/home/jumerckx/llvm-project/mlir/include/mlir/IR/PDLPatternMatch.h.inc:702:80: error: cannot convert ‘const mlir::PDLValue’ to ‘mlir::Operation*’\n  702 |       (ProcessPDLValue\u003ctypename FnTraitsT::template arg_t\u003cI + 1\u003e\u003e::processAsArg(\n      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^\n  703 |           values[I]))...);\n      |           ~~~~~~~~~~~\n/home/jumerckx/llvm-project/mlir/include/mlir/IR/PDLPatternMatch.h.inc:522:36: note:   initializing argument 1 of ‘static T mlir::detail::pdl_function_builder::ProcessPDLValue\u003cT, typename std::enable_if\u003cstd::is_base_of\u003cmlir::OpState, T\u003e::value, void\u003e::type\u003e::processAsArg(mlir::Operation*) [with T \u003d test::OpA]’\n  522 |   static T processAsArg(Operation *value) { return cast\u003cT\u003e(value); }\n      |                         ~~~~~~~~~~~^~~~~\n```\nThis pr fixes that.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4afbcf292496525c0d97e58d4099e3f22fd5673f",
      "old_mode": 33188,
      "old_path": "mlir/include/mlir/IR/PDLPatternMatch.h.inc",
      "new_id": "aa74202178a9bdb25f27d925fd33576760851e42",
      "new_mode": 33188,
      "new_path": "mlir/include/mlir/IR/PDLPatternMatch.h.inc"
    },
    {
      "type": "modify",
      "old_id": "f6b2b2b1c683f62f6296e6335f9c4409da735e96",
      "old_mode": 33188,
      "old_path": "mlir/test/lib/Tools/PDLL/TestPDLL.cpp",
      "new_id": "d2c17fc63f17883818c62edc77458bdfce9863e9",
      "new_mode": 33188,
      "new_path": "mlir/test/lib/Tools/PDLL/TestPDLL.cpp"
    },
    {
      "type": "modify",
      "old_id": "9715b556bbe21477602c5c8ba5b23b398065dd2d",
      "old_mode": 33188,
      "old_path": "mlir/test/lib/Tools/PDLL/TestPDLL.pdll",
      "new_id": "718ab95c4bab0c885768f9004370e61998c0b599",
      "new_mode": 33188,
      "new_path": "mlir/test/lib/Tools/PDLL/TestPDLL.pdll"
    },
    {
      "type": "modify",
      "old_id": "baaffc74bf1f1b1a4c60ef99c2eb84a4bc2c941f",
      "old_mode": 33188,
      "old_path": "mlir/test/mlir-pdll/Integration/test-pdll.mlir",
      "new_id": "f9adcf5347da8cf2e31eac0f95f8846c7809f3ab",
      "new_mode": 33188,
      "new_path": "mlir/test/mlir-pdll/Integration/test-pdll.mlir"
    }
  ]
}
