We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cbf5af9 commit b6a62a4Copy full SHA for b6a62a4
llvm/include/llvm/ADT/SetVector.h
@@ -313,9 +313,8 @@ class SetVector {
313
bool set_union(const STy &S) {
314
bool Changed = false;
315
316
- for (typename STy::const_iterator SI = S.begin(), SE = S.end(); SI != SE;
317
- ++SI)
318
- if (insert(*SI))
+ for (const auto &Elem : S)
+ if (insert(Elem))
319
Changed = true;
320
321
return Changed;
@@ -326,9 +325,8 @@ class SetVector {
326
325
/// SetVector interface is inconsistent with DenseSet.
327
template <class STy>
328
void set_subtract(const STy &S) {
329
330
331
- remove(*SI);
+ remove(Elem);
332
}
333
334
void swap(SetVector<T, Vector, Set, N> &RHS) {
0 commit comments