diff options
author | Chris Lattner <sabre@nondot.org> | 2007-12-12 18:19:33 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-12-12 18:19:33 +0000 |
commit | 5564e07af5e62875f3b83fc2e5a8823588b5adea (patch) | |
tree | 8eca7fe23700f2d4a75b20c189b2c2dda4d13162 | |
parent | 25bb23aa20b69b107bbb4526b2d156599c2434ca (diff) |
add an ivar_size() method that never returns -1.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44944 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/DeclObjC.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h index 386d7b5272..64cfb7e5be 100644 --- a/include/clang/AST/DeclObjC.h +++ b/include/clang/AST/DeclObjC.h @@ -114,8 +114,9 @@ public: int getNumInstanceVariables() const { return NumIvars; } typedef ObjcIvarDecl * const *ivar_iterator; + unsigned ivar_size() const { return NumIvars == -1 ?0 : NumIvars; } ivar_iterator ivar_begin() const { return Ivars; } - ivar_iterator ivar_end() const { return Ivars+(NumIvars == -1 ?0 : NumIvars);} + ivar_iterator ivar_end() const { return Ivars + ivar_size();} ObjcMethodDecl** getInstanceMethods() const { return InstanceMethods; } int getNumInstanceMethods() const { return NumInstanceMethods; } |