diff --git a/mlir/unittests/Bytecode/BytecodeTest.cpp b/mlir/unittests/Bytecode/BytecodeTest.cpp index baf5d5c650e30..cb915a092a0be 100644 --- a/mlir/unittests/Bytecode/BytecodeTest.cpp +++ b/mlir/unittests/Bytecode/BytecodeTest.cpp @@ -69,8 +69,8 @@ TEST(Bytecode, MultiModuleWithResource) { GTEST_SKIP(); // Try to see if we have a valid resource in the parsed module. - auto checkResourceAttribute = [&](Operation *op) { - Attribute attr = roundTripModule->getDiscardableAttr("bytecode.test"); + auto checkResourceAttribute = [](Operation *parsedModule) { + Attribute attr = parsedModule->getDiscardableAttr("bytecode.test"); ASSERT_TRUE(attr); auto denseResourceAttr = dyn_cast(attr); ASSERT_TRUE(denseResourceAttr);