]> granicus.if.org Git - clang/commitdiff
Add CapturedDecl::parameters() ArrayRef accessors following r273647.
authorYaron Keren <yaron.keren@gmail.com>
Wed, 29 Jun 2016 18:55:53 +0000 (18:55 +0000)
committerYaron Keren <yaron.keren@gmail.com>
Wed, 29 Jun 2016 18:55:53 +0000 (18:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274149 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Decl.h

index 7961c007dc40eea020d473999a2d80ecd03020c8..97081ee6b9a2cb6f5995faab011ce1594b99cab8 100644 (file)
@@ -3661,6 +3661,14 @@ public:
     getParams()[i] = P;
   }
 
+  // ArrayRef interface to parameters.
+  ArrayRef<ImplicitParamDecl *> parameters() const {
+    return {getParams(), getNumParams()};
+  }
+  MutableArrayRef<ImplicitParamDecl *> parameters() {
+    return {getParams(), getNumParams()};
+  }
+
   /// \brief Retrieve the parameter containing captured variables.
   ImplicitParamDecl *getContextParam() const {
     assert(ContextParam < NumParams);