r254282 - Use range-based for loop to avoid the need for calculating an array size. NFC
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 29 19:11:12 PST 2015
Author: ctopper
Date: Sun Nov 29 21:11:12 2015
New Revision: 254282
URL: http://llvm.org/viewvc/llvm-project?rev=254282&view=rev
Log:
Use range-based for loop to avoid the need for calculating an array size. NFC
Modified:
cfe/trunk/lib/Analysis/CFG.cpp
Modified: cfe/trunk/lib/Analysis/CFG.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFG.cpp?rev=254282&r1=254281&r2=254282&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFG.cpp (original)
+++ cfe/trunk/lib/Analysis/CFG.cpp Sun Nov 29 21:11:12 2015
@@ -825,10 +825,7 @@ private:
// * Variable x is equal to the largest literal.
// * Variable x is greater than largest literal.
bool AlwaysTrue = true, AlwaysFalse = true;
- for (unsigned int ValueIndex = 0;
- ValueIndex < sizeof(Values) / sizeof(Values[0]);
- ++ValueIndex) {
- llvm::APSInt Value = Values[ValueIndex];
+ for (llvm::APSInt Value : Values) {
TryResult Res1, Res2;
Res1 = analyzeLogicOperatorCondition(BO1, Value, L1);
Res2 = analyzeLogicOperatorCondition(BO2, Value, L2);
More information about the cfe-commits
mailing list