StaticAnalyzer: Switch a loop to a range-based for
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 23 Jun 2014 02:16:38 +0000 (02:16 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 23 Jun 2014 02:16:38 +0000 (02:16 +0000)
Merely a code simplification, no functionality change.

llvm-svn: 211484

clang/lib/StaticAnalyzer/Core/ExprEngine.cpp

index d03051c..06eaf99 100644 (file)
@@ -2253,9 +2253,8 @@ void ExprEngine::VisitGCCAsmStmt(const GCCAsmStmt *A, ExplodedNode *Pred,
 
   ProgramStateRef state = Pred->getState();
 
-  for (GCCAsmStmt::const_outputs_iterator OI = A->begin_outputs(),
-       OE = A->end_outputs(); OI != OE; ++OI) {
-    SVal X = state->getSVal(*OI, Pred->getLocationContext());
+  for (const Expr *O : A->outputs()) {
+    SVal X = state->getSVal(O, Pred->getLocationContext());
     assert (!X.getAs<NonLoc>());  // Should be an Lval, or unknown, undef.
 
     if (Optional<Loc> LV = X.getAs<Loc>())