aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaType.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-03-16 01:07:14 +0000
committerChris Lattner <sabre@nondot.org>2008-03-16 01:07:14 +0000
commit58cce3b0dcbdcc95b7e713795834b4cb2c8a008a (patch)
tree75a48d13ba6ab15c4954b5bb475de899c7e66df8 /lib/Sema/SemaType.cpp
parentb06fa3b86951b9f179c99c3768331536c32e902d (diff)
Make the parameter count of ObjCMethodDecl unsigned, you
can't have negative arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48407 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r--lib/Sema/SemaType.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index f717b4139a..d4cb979563 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -383,7 +383,7 @@ QualType Sema::ObjCGetTypeForMethodDefinition(DeclTy *D) {
ArgTys.push_back(Context.getObjCIdType());
ArgTys.push_back(Context.getObjCSelType());
- for (int i = 0; i < MDecl->getNumParams(); i++) {
+ for (int i = 0, e = MDecl->getNumParams(); i != e; ++i) {
ParmVarDecl *PDecl = MDecl->getParamDecl(i);
QualType ArgTy = PDecl->getType();
assert(!ArgTy.isNull() && "Couldn't parse type?");