Skip to content

Commit 88e9055

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 c987950 commit 88e9055

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,9 @@ 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 {
235+
return parseLvlSpec(requireLvlVarBinding);
236+
},
235237
" in level-specifier list");
236238
FAILURE_IF_FAILED(res)
237239
const auto specLvlRank = lvlSpecs.size();

mlir/lib/Transforms/InlinerPass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void InlinerPass::runOnOperation() {
139139
}
140140

141141
// By default, assume that any inlining is profitable.
142-
auto profitabilityCb = [=](const Inliner::ResolvedCall &call) {
142+
auto profitabilityCb = [this](const Inliner::ResolvedCall &call) {
143143
return isProfitableToInline(call, inliningThreshold);
144144
};
145145

0 commit comments

Comments
 (0)