[cfe-commits] r44944 - /cfe/trunk/include/clang/AST/DeclObjC.h

Chris Lattner sabre at nondot.org
Wed Dec 12 10:19:34 PST 2007


Author: lattner
Date: Wed Dec 12 12:19:33 2007
New Revision: 44944

URL: http://llvm.org/viewvc/llvm-project?rev=44944&view=rev
Log:
add an ivar_size() method that never returns -1.

Modified:
    cfe/trunk/include/clang/AST/DeclObjC.h

Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=44944&r1=44943&r2=44944&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Wed Dec 12 12:19:33 2007
@@ -114,8 +114,9 @@
   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; }





More information about the cfe-commits mailing list