[llvm] r216987 - [CFLAA] Remove tautological comparison
Hal Finkel
hfinkel at anl.gov
Tue Sep 2 15:36:59 PDT 2014
Author: hfinkel
Date: Tue Sep 2 17:36:58 2014
New Revision: 216987
URL: http://llvm.org/viewvc/llvm-project?rev=216987&view=rev
Log:
[CFLAA] Remove tautological comparison
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(); }
Modified:
llvm/trunk/lib/Analysis/StratifiedSets.h
Modified: llvm/trunk/lib/Analysis/StratifiedSets.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/StratifiedSets.h?rev=216987&r1=216986&r2=216987&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/StratifiedSets.h (original)
+++ llvm/trunk/lib/Analysis/StratifiedSets.h Tue Sep 2 17:36:58 2014
@@ -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
More information about the llvm-commits
mailing list