process (I don't believe it's possible to write a testcase for the bug with
a non-checking STL implementation).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203042
91177308-0d34-0410-b5e6-
96231b3b80d8
}
// If this macro is already in our list of conflicts, remove it from there.
- for (unsigned AI = 0, AN = Ambig.size(); AI != AN; ++AI)
- if (Ambig[AI]->getInfo()->getOwningModuleID() == OwnerID)
- Ambig.erase(Ambig.begin() + AI);
+ Ambig.erase(
+ std::remove_if(Ambig.begin(), Ambig.end(), [&](DefMacroDirective *MD) {
+ return MD->getInfo()->getOwningModuleID() == OwnerID;
+ }),
+ Ambig.end());
}
}