[llvm] 79748ad - Fix MSVC lamdba default capture mode warning. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 29 07:47:35 PST 2020
Author: Simon Pilgrim
Date: 2020-01-29T15:47:04Z
New Revision: 79748add70d2d24c48c8d77cc777d855a939576e
URL: https://github.com/llvm/llvm-project/commit/79748add70d2d24c48c8d77cc777d855a939576e
DIFF: https://github.com/llvm/llvm-project/commit/79748add70d2d24c48c8d77cc777d855a939576e.diff
LOG: Fix MSVC lamdba default capture mode warning. NFCI.
Added:
Modified:
llvm/lib/Transforms/Utils/CodeMoverUtils.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/CodeMoverUtils.cpp b/llvm/lib/Transforms/Utils/CodeMoverUtils.cpp
index 2a637601417d..383e749f32c4 100644
--- a/llvm/lib/Transforms/Utils/CodeMoverUtils.cpp
+++ b/llvm/lib/Transforms/Utils/CodeMoverUtils.cpp
@@ -154,7 +154,7 @@ const Optional<ControlConditions> ControlConditions::collectControlConditions(
bool ControlConditions::addControlCondition(ControlCondition C) {
bool Inserted = false;
- if (none_of(Conditions, [&C](ControlCondition &Exists) {
+ if (none_of(Conditions, [&](ControlCondition &Exists) {
return ControlConditions::isEquivalent(C, Exists);
})) {
Conditions.push_back(C);
@@ -172,8 +172,8 @@ bool ControlConditions::isEquivalent(const ControlConditions &Other) const {
if (Conditions.size() != Other.Conditions.size())
return false;
- return all_of(Conditions, [&Other](const ControlCondition &C) {
- return any_of(Other.Conditions, [&C](const ControlCondition &OtherC) {
+ return all_of(Conditions, [&](const ControlCondition &C) {
+ return any_of(Other.Conditions, [&](const ControlCondition &OtherC) {
return ControlConditions::isEquivalent(C, OtherC);
});
});
More information about the llvm-commits
mailing list