diff options
author | Anders Carlsson <andersca@mac.com> | 2009-09-08 01:23:37 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-09-08 01:23:37 +0000 |
commit | bcb11d01c034f967503bd98f28bdf458c1ab8001 (patch) | |
tree | 238994dc123592ab5cb9860799fed35478cddbf7 /include/clang | |
parent | 4ca606e898293ae58f1793f988500e2218c7a9be (diff) |
Clean up the CXXConstructExpr constructor, add Arg getters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81178 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/AST/ExprCXX.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/clang/AST/ExprCXX.h b/include/clang/AST/ExprCXX.h index 791d94ded0..b10191002f 100644 --- a/include/clang/AST/ExprCXX.h +++ b/include/clang/AST/ExprCXX.h @@ -517,6 +517,16 @@ public: unsigned getNumArgs() const { return NumArgs; } + /// getArg - Return the specified argument. + Expr *getArg(unsigned Arg) { + assert(Arg < NumArgs && "Arg access out of range!"); + return cast<Expr>(Args[Arg]); + } + const Expr *getArg(unsigned Arg) const { + assert(Arg < NumArgs && "Arg access out of range!"); + return cast<Expr>(Args[Arg]); + } + /// setArg - Set the specified argument. void setArg(unsigned Arg, Expr *ArgExpr) { assert(Arg < NumArgs && "Arg access out of range!"); |