From: Hal Finkel Date: Tue, 2 Sep 2014 22:36:58 +0000 (+0000) Subject: [CFLAA] Remove tautological comparison X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=41b6e327f7dedfb9d3020f60f6c6804efeb75b16;p=oota-llvm.git [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(); } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216987 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/StratifiedSets.h b/lib/Analysis/StratifiedSets.h index 3000d5bce81..90e840f9252 100644 --- a/lib/Analysis/StratifiedSets.h +++ b/lib/Analysis/StratifiedSets.h @@ -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