[CFLAA] Remove tautological comparison
authorHal Finkel <hfinkel@anl.gov>
Tue, 2 Sep 2014 22:36:58 +0000 (22:36 +0000)
committerHal Finkel <hfinkel@anl.gov>
Tue, 2 Sep 2014 22:36:58 +0000 (22:36 +0000)
Fixes this (the warning is right, the unsigned value is not negative):
lib/Analysis/StratifiedSets.h:689:53: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
  bool inbounds(StratifiedIndex N) const { return N >= 0 && N < Links.size(); }

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216987 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/StratifiedSets.h

index 3000d5bce8160bfa514981ad1372f343c9ca4074..90e840f925234ce5e0483383ce25d8edefe192b0 100644 (file)
@@ -686,7 +686,7 @@ private:
     return Link;
   }
 
-  bool inbounds(StratifiedIndex N) const { return N >= 0 && N < Links.size(); }
+  bool inbounds(StratifiedIndex N) const { return N < Links.size(); }
 };
 }
 #endif // LLVM_ADT_STRATIFIEDSETS_H