From: Ted Kremenek Date: Tue, 25 Mar 2008 00:16:48 +0000 (+0000) Subject: Added "arg_iterators" to ObjCMessageExpr (for iterating over the arguments of a messa... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3fb94d87b937a89400d1195479702b6f6bb9a59e;p=clang Added "arg_iterators" to ObjCMessageExpr (for iterating over the arguments of a message expression) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48756 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index 73ed5df66b..37f5d66a14 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -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