Add ArrayRef<> interface to get the formal parameters of a BlockDecl.

llvm-svn: 199471
This commit is contained in:
Ted Kremenek 2014-01-17 07:15:26 +00:00
parent 5a44496988
commit 81541c561c
1 changed files with 6 additions and 0 deletions

View File

@ -3264,6 +3264,12 @@ public:
typedef ParmVarDecl **param_iterator;
typedef ParmVarDecl * const *param_const_iterator;
// ArrayRef access to formal parameters.
// FIXME: Should eventual replace iterator access.
ArrayRef<ParmVarDecl*> parameters() const {
return llvm::makeArrayRef(ParamInfo, param_size());
}
bool param_empty() const { return NumParams == 0; }
param_iterator param_begin() { return ParamInfo; }
param_iterator param_end() { return ParamInfo+param_size(); }