diff options
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index bc1f3a821cd..3af3bff0409 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -5380,19 +5380,11 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S, S += "@?"; // Block parameters if (const FunctionProtoType *FPT = dyn_cast<FunctionProtoType>(FT)) { - for (FunctionProtoType::param_type_iterator I = FPT->param_type_begin(), - E = FPT->param_type_end(); - I && (I != E); ++I) { - getObjCEncodingForTypeImpl(*I, S, - ExpandPointedToStructures, - ExpandStructures, - FD, - false /* OutermostType */, - EncodingProperty, - false /* StructField */, - EncodeBlockParameters, - EncodeClassNames); - } + for (const auto &I : FPT->param_types()) + getObjCEncodingForTypeImpl( + I, S, ExpandPointedToStructures, ExpandStructures, FD, + false /* OutermostType */, EncodingProperty, + false /* StructField */, EncodeBlockParameters, EncodeClassNames); } S += '>'; } |