[PATCH] D98297: Fix a compiler warning

Xiaoqing Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 9 15:11:29 PST 2021


xiaoqing_wu created this revision.
xiaoqing_wu added reviewers: kazu, jdoerfert, qcolombet.
Herald added a subscriber: dexonsmith.
xiaoqing_wu requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Fix a warning caused by -Wrange-loop-analysis


https://reviews.llvm.org/D98297

Files:
  llvm/include/llvm/ADT/SetOperations.h


Index: llvm/include/llvm/ADT/SetOperations.h
===================================================================
--- llvm/include/llvm/ADT/SetOperations.h
+++ llvm/include/llvm/ADT/SetOperations.h
@@ -71,7 +71,7 @@
 bool set_is_subset(const S1Ty &S1, const S2Ty &S2) {
   if (S1.size() > S2.size())
     return false;
-  for (const auto &It : S1)
+  for (const auto It : S1)
     if (!S2.count(It))
       return false;
   return true;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98297.329478.patch
Type: text/x-patch
Size: 436 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210309/84757404/attachment.bin>


More information about the llvm-commits mailing list