@@ -3292,8 +3292,8 @@ std::string RewriteObjC::SynthesizeBlockFunc(BlockExpr *CE, int i,
3292
3292
3293
3293
// Create local declarations to avoid rewriting all closure decl ref exprs.
3294
3294
// First, emit a declaration for all "by ref" decls.
3295
- for (SmallVectorImpl<ValueDecl *>::iterator I = BlockByRefDecls.begin (),
3296
- E = BlockByRefDecls. end (); I != E; ++I) {
3295
+ for (auto I = BlockByRefDecls.begin (), E = BlockByRefDecls. end (); I != E;
3296
+ ++I) {
3297
3297
S += " " ;
3298
3298
std::string Name = (*I)->getNameAsString ();
3299
3299
std::string TypeString;
@@ -3303,8 +3303,8 @@ std::string RewriteObjC::SynthesizeBlockFunc(BlockExpr *CE, int i,
3303
3303
S += Name + " = __cself->" + (*I)->getNameAsString () + " ; // bound by ref\n " ;
3304
3304
}
3305
3305
// Next, emit a declaration for all "by copy" declarations.
3306
- for (SmallVectorImpl<ValueDecl *>::iterator I = BlockByCopyDecls.begin (),
3307
- E = BlockByCopyDecls. end (); I != E; ++I) {
3306
+ for (auto I = BlockByCopyDecls.begin (), E = BlockByCopyDecls. end (); I != E;
3307
+ ++I) {
3308
3308
S += " " ;
3309
3309
// Handle nested closure invocation. For example:
3310
3310
//
@@ -3400,8 +3400,8 @@ std::string RewriteObjC::SynthesizeBlockImpl(BlockExpr *CE, std::string Tag,
3400
3400
3401
3401
if (BlockDeclRefs.size ()) {
3402
3402
// Output all "by copy" declarations.
3403
- for (SmallVectorImpl<ValueDecl *>::iterator I = BlockByCopyDecls.begin (),
3404
- E = BlockByCopyDecls. end (); I != E; ++I) {
3403
+ for (auto I = BlockByCopyDecls.begin (), E = BlockByCopyDecls. end (); I != E;
3404
+ ++I) {
3405
3405
S += " " ;
3406
3406
std::string FieldName = (*I)->getNameAsString ();
3407
3407
std::string ArgName = " _" + FieldName;
@@ -3429,8 +3429,8 @@ std::string RewriteObjC::SynthesizeBlockImpl(BlockExpr *CE, std::string Tag,
3429
3429
S += FieldName + " ;\n " ;
3430
3430
}
3431
3431
// Output all "by ref" declarations.
3432
- for (SmallVectorImpl<ValueDecl *>::iterator I = BlockByRefDecls.begin (),
3433
- E = BlockByRefDecls. end (); I != E; ++I) {
3432
+ for (auto I = BlockByRefDecls.begin (), E = BlockByRefDecls. end (); I != E;
3433
+ ++I) {
3434
3434
S += " " ;
3435
3435
std::string FieldName = (*I)->getNameAsString ();
3436
3436
std::string ArgName = " _" + FieldName;
@@ -3448,8 +3448,8 @@ std::string RewriteObjC::SynthesizeBlockImpl(BlockExpr *CE, std::string Tag,
3448
3448
Constructor += " , int flags=0)" ;
3449
3449
// Initialize all "by copy" arguments.
3450
3450
bool firsTime = true ;
3451
- for (SmallVectorImpl<ValueDecl *>::iterator I = BlockByCopyDecls.begin (),
3452
- E = BlockByCopyDecls. end (); I != E; ++I) {
3451
+ for (auto I = BlockByCopyDecls.begin (), E = BlockByCopyDecls. end (); I != E;
3452
+ ++I) {
3453
3453
std::string Name = (*I)->getNameAsString ();
3454
3454
if (firsTime) {
3455
3455
Constructor += " : " ;
@@ -3463,8 +3463,8 @@ std::string RewriteObjC::SynthesizeBlockImpl(BlockExpr *CE, std::string Tag,
3463
3463
Constructor += Name + " (_" + Name + " )" ;
3464
3464
}
3465
3465
// Initialize all "by ref" arguments.
3466
- for (SmallVectorImpl<ValueDecl *>::iterator I = BlockByRefDecls.begin (),
3467
- E = BlockByRefDecls. end (); I != E; ++I) {
3466
+ for (auto I = BlockByRefDecls.begin (), E = BlockByRefDecls. end (); I != E;
3467
+ ++I) {
3468
3468
std::string Name = (*I)->getNameAsString ();
3469
3469
if (firsTime) {
3470
3470
Constructor += " : " ;
@@ -4439,8 +4439,8 @@ Stmt *RewriteObjC::SynthBlockInitExpr(BlockExpr *Exp,
4439
4439
if (BlockDeclRefs.size ()) {
4440
4440
Expr *Exp;
4441
4441
// Output all "by copy" declarations.
4442
- for (SmallVectorImpl<ValueDecl *>::iterator I = BlockByCopyDecls.begin (),
4443
- E = BlockByCopyDecls. end (); I != E; ++I) {
4442
+ for (auto I = BlockByCopyDecls.begin (), E = BlockByCopyDecls. end (); I != E;
4443
+ ++I) {
4444
4444
if (isObjCType ((*I)->getType ())) {
4445
4445
// FIXME: Conform to ABI ([[obj retain] autorelease]).
4446
4446
FD = SynthBlockInitFunctionDecl ((*I)->getName ());
@@ -4476,8 +4476,8 @@ Stmt *RewriteObjC::SynthBlockInitExpr(BlockExpr *Exp,
4476
4476
InitExprs.push_back (Exp);
4477
4477
}
4478
4478
// Output all "by ref" declarations.
4479
- for (SmallVectorImpl<ValueDecl *>::iterator I = BlockByRefDecls.begin (),
4480
- E = BlockByRefDecls. end (); I != E; ++I) {
4479
+ for (auto I = BlockByRefDecls.begin (), E = BlockByRefDecls. end (); I != E;
4480
+ ++I) {
4481
4481
ValueDecl *ND = (*I);
4482
4482
std::string Name (ND->getNameAsString ());
4483
4483
std::string RecName;
0 commit comments