]> granicus.if.org Git - clang/commitdiff
Added "arg_iterators" to ObjCMessageExpr (for iterating over the arguments of a messa...
authorTed Kremenek <kremenek@apple.com>
Tue, 25 Mar 2008 00:16:48 +0000 (00:16 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 25 Mar 2008 00:16:48 +0000 (00:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48756 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Expr.h

index 73ed5df66be724251043d9a6fe4bdf1c703474fc..37f5d66a14d69d262b48ea47f5951d7aa664dfdc 100644 (file)
@@ -1551,6 +1551,14 @@ public:
   // Iterators
   virtual child_iterator child_begin();
   virtual child_iterator child_end();
+  
+  typedef Expr** arg_iterator;
+  typedef const Expr* const* const_arg_iterator;
+  
+  arg_iterator arg_begin() { return &SubExprs[ARGS_START]; }
+  arg_iterator arg_end()   { return arg_begin() + NumArgs; }
+  const_arg_iterator arg_begin() const { return &SubExprs[ARGS_START]; }
+  const_arg_iterator arg_end() const { return arg_begin() + NumArgs; }  
 };
 
 }  // end namespace clang