diff options
| author | Eric Christopher <echristo@apple.com> | 2012-02-29 03:25:27 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@apple.com> | 2012-02-29 03:25:27 +0000 |
| commit | b0177eba7c1ce7f27df4fa934e0022ee457b6f1c (patch) | |
| tree | 79cfdf674feb8ee5a31dd9ea829e2ae9a176357f | |
| parent | d47e0862b23e699f5bc3fd7c38cc61afc96f2ec6 (diff) | |
| download | bcm5719-llvm-b0177eba7c1ce7f27df4fa934e0022ee457b6f1c.tar.gz bcm5719-llvm-b0177eba7c1ce7f27df4fa934e0022ee457b6f1c.zip | |
Add some iterators for grabbing lambda expression contexts.
llvm-svn: 151701
| -rw-r--r-- | clang/include/clang/AST/DeclCXX.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/include/clang/AST/DeclCXX.h b/clang/include/clang/AST/DeclCXX.h index b2773027e00..23145489422 100644 --- a/clang/include/clang/AST/DeclCXX.h +++ b/clang/include/clang/AST/DeclCXX.h @@ -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() { |

