Skip to content

Commit 2829486

Browse files
committed
[IR] Ignore the return value of std::remove_if (NFC)
/Users/jiefu/llvm-project/llvm/lib/IR/Instructions.cpp:166:3: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result] std::remove_if(const_cast<block_iterator>(block_begin()), ^~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated.
1 parent b4e0589 commit 2829486

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/IR/Instructions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ void PHINode::removeIncomingValueIf(function_ref<bool(unsigned)> Predicate,
163163
U.set(nullptr);
164164

165165
// Remove incoming blocks.
166-
std::remove_if(const_cast<block_iterator>(block_begin()),
166+
(void)std::remove_if(const_cast<block_iterator>(block_begin()),
167167
const_cast<block_iterator>(block_end()), [&](BasicBlock *&BB) {
168168
return RemoveIndices.contains(&BB - block_begin());
169169
});

0 commit comments

Comments
 (0)