]> granicus.if.org Git - clang/commitdiff
Fix a misuse of iterators when iterating through block's
authorFariborz Jahanian <fjahanian@apple.com>
Thu, 8 Apr 2010 18:06:22 +0000 (18:06 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Thu, 8 Apr 2010 18:06:22 +0000 (18:06 +0000)
parameters list for encoding.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100788 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ASTContext.cpp

index f265f8e8a70c7d282c08e20b95312a2d99b42a8e..513bbd387145b274fbf8d8d87daaf439be68054d 100644 (file)
@@ -3192,7 +3192,7 @@ std::string charUnitsToString(const CharUnits &CU) {
   return llvm::itostr(CU.getQuantity());
 }
 
-/// getObjCEncodingForBlockDecl - Return the encoded type for this method
+/// getObjCEncodingForBlockDecl - Return the encoded type for this block
 /// declaration.
 void ASTContext::getObjCEncodingForBlock(const BlockExpr *Expr, 
                                              std::string& S) {
@@ -3207,7 +3207,7 @@ void ASTContext::getObjCEncodingForBlock(const BlockExpr *Expr,
   SourceLocation Loc;
   CharUnits PtrSize = getTypeSizeInChars(VoidPtrTy);
   CharUnits ParmOffset = PtrSize;
-  for (ObjCMethodDecl::param_iterator PI = Decl->param_begin(),
+  for (BlockDecl::param_const_iterator PI = Decl->param_begin(),
        E = Decl->param_end(); PI != E; ++PI) {
     QualType PType = (*PI)->getType();
     CharUnits sz = getObjCEncodingTypeSize(PType);