aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/ADT/SetOperations.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ADT/SetOperations.h')
-rw-r--r--include/llvm/ADT/SetOperations.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/SetOperations.h b/include/llvm/ADT/SetOperations.h
index 71f5db380f6e..7c9f2fbe066e 100644
--- a/include/llvm/ADT/SetOperations.h
+++ b/include/llvm/ADT/SetOperations.h
@@ -39,7 +39,7 @@ bool set_union(S1Ty &S1, const S2Ty &S2) {
template <class S1Ty, class S2Ty>
void set_intersect(S1Ty &S1, const S2Ty &S2) {
for (typename S1Ty::iterator I = S1.begin(); I != S1.end();) {
- const typename S1Ty::key_type &E = *I;
+ const auto &E = *I;
++I;
if (!S2.count(E)) S1.erase(E); // Erase element if not in S2
}