Skip to content

Commit 3f9d457

Browse files
committed
NFC: remove some instances of deprecated capture
``` warning: implicit capture of 'this' with a capture default of '=' is deprecated [-Wdeprecated-this-capture] ```
1 parent d26ea02 commit 3f9d457

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,10 @@ bool MetadataVerifier::verifyScalarEntry(
7777
msgpack::MapDocNode &MapNode, StringRef Key, bool Required,
7878
msgpack::Type SKind,
7979
function_ref<bool(msgpack::DocNode &)> verifyValue) {
80-
return verifyEntry(MapNode, Key, Required, [=](msgpack::DocNode &Node) {
81-
return verifyScalar(Node, SKind, verifyValue);
82-
});
80+
return verifyEntry(MapNode, Key, Required,
81+
[this, SKind, verifyValue](msgpack::DocNode &Node) {
82+
return verifyScalar(Node, SKind, verifyValue);
83+
});
8384
}
8485

8586
bool MetadataVerifier::verifyIntegerEntry(msgpack::MapDocNode &MapNode,

llvm/lib/Support/Parallel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class ThreadPoolExecutor : public Executor {
6060
auto &Thread0 = Threads[0];
6161
Thread0 = std::thread([this, S] {
6262
for (unsigned I = 1; I < ThreadCount; ++I) {
63-
Threads.emplace_back([=] { work(S, I); });
63+
Threads.emplace_back([this, S, I] { work(S, I); });
6464
if (Stop)
6565
break;
6666
}

llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ class AMDGPUOperand : public MCParsedAsmOperand {
10071007
bool isEndpgm() const;
10081008

10091009
auto getPredicate(std::function<bool(const AMDGPUOperand &Op)> P) const {
1010-
return [=](){ return P(*this); };
1010+
return [this, P](){ return P(*this); };
10111011
}
10121012

10131013
StringRef getToken() const {

mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMapParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ ParseResult DimLvlMapParser::parseLvlSpecList() {
231231
const auto loc = parser.getCurrentLocation();
232232
const auto res = parser.parseCommaSeparatedList(
233233
mlir::OpAsmParser::Delimiter::Paren,
234-
[=]() -> ParseResult { return parseLvlSpec(requireLvlVarBinding); },
234+
[this, requireLvlVarBinding]() -> ParseResult { return parseLvlSpec(requireLvlVarBinding); },
235235
" in level-specifier list");
236236
FAILURE_IF_FAILED(res)
237237
const auto specLvlRank = lvlSpecs.size();

mlir/lib/Transforms/InlinerPass.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,10 @@ void InlinerPass::runOnOperation() {
138138
}
139139

140140
// By default, assume that any inlining is profitable.
141-
auto profitabilityCb = [=](const Inliner::ResolvedCall &call) {
142-
return isProfitableToInline(call, inliningThreshold);
143-
};
141+
auto profitabilityCb =
142+
[this, inliningThreshold](const Inliner::ResolvedCall &call) {
143+
return isProfitableToInline(call, inliningThreshold);
144+
};
144145

145146
// Get an instance of the inliner.
146147
Inliner inliner(op, cg, *this, getAnalysisManager(), runPipelineHelper,

0 commit comments

Comments
 (0)