Fix a misuse of iterators when iterating through block's
parameters list for encoding. llvm-svn: 100788
This commit is contained in:
parent
386e01e879
commit
590c3524ac
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue