[cfe-commits] r48756 - /cfe/trunk/include/clang/AST/Expr.h

Ted Kremenek kremenek at apple.com
Mon Mar 24 17:16:49 PDT 2008


Author: kremenek
Date: Mon Mar 24 19:16:48 2008
New Revision: 48756

URL: http://llvm.org/viewvc/llvm-project?rev=48756&view=rev
Log:
Added "arg_iterators" to ObjCMessageExpr (for iterating over the arguments of a message expression)

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

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

==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Mon Mar 24 19:16:48 2008
@@ -1551,6 +1551,14 @@
   // 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





More information about the cfe-commits mailing list