diff --git a/llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp b/llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp index 33eed07c46292..8737dc0fc7459 100644 --- a/llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp +++ b/llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp @@ -77,9 +77,10 @@ bool MetadataVerifier::verifyScalarEntry( msgpack::MapDocNode &MapNode, StringRef Key, bool Required, msgpack::Type SKind, function_ref verifyValue) { - return verifyEntry(MapNode, Key, Required, [=](msgpack::DocNode &Node) { - return verifyScalar(Node, SKind, verifyValue); - }); + return verifyEntry(MapNode, Key, Required, + [this, SKind, verifyValue](msgpack::DocNode &Node) { + return verifyScalar(Node, SKind, verifyValue); + }); } bool MetadataVerifier::verifyIntegerEntry(msgpack::MapDocNode &MapNode, diff --git a/llvm/lib/Support/Parallel.cpp b/llvm/lib/Support/Parallel.cpp index 2ba02b73dd8f1..3ac6fc74fd3e0 100644 --- a/llvm/lib/Support/Parallel.cpp +++ b/llvm/lib/Support/Parallel.cpp @@ -60,7 +60,7 @@ class ThreadPoolExecutor : public Executor { auto &Thread0 = Threads[0]; Thread0 = std::thread([this, S] { for (unsigned I = 1; I < ThreadCount; ++I) { - Threads.emplace_back([=] { work(S, I); }); + Threads.emplace_back([this, S, I] { work(S, I); }); if (Stop) break; } diff --git a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp index 2e21ba4c30b53..a23c2fc8f2e65 100644 --- a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp +++ b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp @@ -1007,7 +1007,7 @@ class AMDGPUOperand : public MCParsedAsmOperand { bool isEndpgm() const; auto getPredicate(std::function P) const { - return [=](){ return P(*this); }; + return [this, P]() { return P(*this); }; } StringRef getToken() const { diff --git a/mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMapParser.cpp b/mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMapParser.cpp index 56b435c57d30a..9694a40807be3 100644 --- a/mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMapParser.cpp +++ b/mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMapParser.cpp @@ -231,7 +231,9 @@ ParseResult DimLvlMapParser::parseLvlSpecList() { const auto loc = parser.getCurrentLocation(); const auto res = parser.parseCommaSeparatedList( mlir::OpAsmParser::Delimiter::Paren, - [=]() -> ParseResult { return parseLvlSpec(requireLvlVarBinding); }, + [this, requireLvlVarBinding]() -> ParseResult { + return parseLvlSpec(requireLvlVarBinding); + }, " in level-specifier list"); FAILURE_IF_FAILED(res) const auto specLvlRank = lvlSpecs.size(); diff --git a/mlir/lib/Transforms/InlinerPass.cpp b/mlir/lib/Transforms/InlinerPass.cpp index b07363c3dafe4..77a9e6cbd8c9f 100644 --- a/mlir/lib/Transforms/InlinerPass.cpp +++ b/mlir/lib/Transforms/InlinerPass.cpp @@ -139,7 +139,7 @@ void InlinerPass::runOnOperation() { } // By default, assume that any inlining is profitable. - auto profitabilityCb = [=](const Inliner::ResolvedCall &call) { + auto profitabilityCb = [this](const Inliner::ResolvedCall &call) { return isProfitableToInline(call, inliningThreshold); };