From 8925dc0ae0800623e882fd3c650d8ac4b6ceacf9 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Fri, 24 Oct 2014 19:54:32 +0000 Subject: [PATCH] CodeGen: trivial conversion to range based loop Switch to a range-based for loop. NFC. llvm-svn: 220587 --- clang/lib/CodeGen/CGExpr.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 32b2e2c..cabedc3 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -313,8 +313,8 @@ createReferenceTemporary(CodeGenFunction &CGF, llvm_unreachable("unknown storage duration"); } -LValue CodeGenFunction::EmitMaterializeTemporaryExpr( - const MaterializeTemporaryExpr *M) { +LValue CodeGenFunction:: +EmitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *M) { const Expr *E = M->GetTemporaryExpr(); if (getLangOpts().ObjCAutoRefCount && @@ -342,8 +342,8 @@ LValue CodeGenFunction::EmitMaterializeTemporaryExpr( SmallVector Adjustments; E = E->skipRValueSubobjectAdjustments(CommaLHSs, Adjustments); - for (unsigned I = 0, N = CommaLHSs.size(); I != N; ++I) - EmitIgnoredExpr(CommaLHSs[I]); + for (const auto &Ignored : CommaLHSs) + EmitIgnoredExpr(Ignored); if (const auto *opaque = dyn_cast(E)) { if (opaque->getType()->isRecordType()) { -- 2.7.4