Add some iterators for grabbing lambda expression contexts.

llvm-svn: 151701
This commit is contained in:
Eric Christopher 2012-02-29 03:25:27 +00:00
parent d47e0862b2
commit b0177eba7c
1 changed files with 8 additions and 0 deletions

View File

@ -997,6 +997,14 @@ public:
void getCaptureFields(llvm::DenseMap<const VarDecl *, FieldDecl *> &Captures,
FieldDecl *&ThisCapture) const;
typedef const LambdaExpr::Capture* capture_const_iterator;
capture_const_iterator captures_begin() const {
return isLambda() ? getLambdaData().Captures : NULL;
}
capture_const_iterator captures_end() const {
return isLambda() ? captures_begin() + getLambdaData().NumCaptures : NULL;
}
/// getConversions - Retrieve the overload set containing all of the
/// conversion functions in this class.
UnresolvedSetImpl *getConversionFunctions() {