summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-04-08 18:06:22 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-04-08 18:06:22 +0000
commit590c3524ac0069b02e2ccfca646b1ba20405ec45 (patch)
tree994a1576fdc84af941636cd32b0a6ab27f529ed3 /clang/lib/AST/ASTContext.cpp
parent386e01e8796501bc40f251fe436e67d429c55b7a (diff)
downloadbcm5719-llvm-590c3524ac0069b02e2ccfca646b1ba20405ec45.tar.gz
bcm5719-llvm-590c3524ac0069b02e2ccfca646b1ba20405ec45.zip
Fix a misuse of iterators when iterating through block's
parameters list for encoding. llvm-svn: 100788
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index f265f8e8a70..513bbd38714 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -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);
OpenPOWER on IntegriCloud