summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CFG.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2015-11-30 03:11:12 +0000
committerCraig Topper <craig.topper@gmail.com>2015-11-30 03:11:12 +0000
commit9b2438f6d1eca098850abc691b42dcc1695f2280 (patch)
tree3e92800803efb1328e489e6c2c96b5fe48647e34 /clang/lib/Analysis/CFG.cpp
parentac67c05a50586d1bab9ea1b82735a6f0dc34b3db (diff)
downloadbcm5719-llvm-9b2438f6d1eca098850abc691b42dcc1695f2280.tar.gz
bcm5719-llvm-9b2438f6d1eca098850abc691b42dcc1695f2280.zip
Use range-based for loop to avoid the need for calculating an array size. NFC
llvm-svn: 254282
Diffstat (limited to 'clang/lib/Analysis/CFG.cpp')
-rw-r--r--clang/lib/Analysis/CFG.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp
index cff15cb3fd8..ed2239f88ae 100644
--- a/clang/lib/Analysis/CFG.cpp
+++ b/clang/lib/Analysis/CFG.cpp
@@ -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);
OpenPOWER on IntegriCloud