[llvm] 49942c6 - [NFC] Fix a compiler warning

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 10 13:30:33 PST 2021


Author: Quentin Colombet
Date: 2021-03-10T13:28:53-08:00
New Revision: 49942c6d4a0aee740381f754a6a0e6f7e1bfed43

URL: https://github.com/llvm/llvm-project/commit/49942c6d4a0aee740381f754a6a0e6f7e1bfed43
DIFF: https://github.com/llvm/llvm-project/commit/49942c6d4a0aee740381f754a6a0e6f7e1bfed43.diff

LOG: [NFC] Fix a compiler warning

Fix a warning caused by -Wrange-loop-analysis

Patch by Xiaoqing Wu <xiaoqing_wu at apple.com>

Differential Revision: https://reviews.llvm.org/D98297

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/SetOperations.h b/llvm/include/llvm/ADT/SetOperations.h
index d3c22306cb57..62f1d26dc1c2 100644
--- a/llvm/include/llvm/ADT/SetOperations.h
+++ b/llvm/include/llvm/ADT/SetOperations.h
@@ -71,7 +71,7 @@ template <class S1Ty, class S2Ty>
 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;


        


More information about the llvm-commits mailing list