r220587 - CodeGen: trivial conversion to range based loop
Saleem Abdulrasool
compnerd at compnerd.org
Fri Oct 24 12:54:32 PDT 2014
Author: compnerd
Date: Fri Oct 24 14:54:32 2014
New Revision: 220587
URL: http://llvm.org/viewvc/llvm-project?rev=220587&view=rev
Log:
CodeGen: trivial conversion to range based loop
Switch to a range-based for loop. NFC.
Modified:
cfe/trunk/lib/CodeGen/CGExpr.cpp
Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=220587&r1=220586&r2=220587&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Fri Oct 24 14:54:32 2014
@@ -313,8 +313,8 @@ createReferenceTemporary(CodeGenFunction
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::EmitMaterializeT
SmallVector<SubobjectAdjustment, 2> 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<OpaqueValueExpr>(E)) {
if (opaque->getType()->isRecordType()) {
More information about the cfe-commits
mailing list