Serialization for captured statements
Add serialization for captured statements and captured decls. Also add
a const_capture_iterator to CapturedStmt.
Test contributed by Wei Pan
Differential Revision: http://llvm-reviews.chandlerc.com/D727
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181048 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp
index 888a148..0db97d2 100644
--- a/lib/AST/Stmt.cpp
+++ b/lib/AST/Stmt.cpp
@@ -1124,8 +1124,8 @@
}
bool CapturedStmt::capturesVariable(const VarDecl *Var) const {
- for (capture_iterator I = capture_begin(),
- E = capture_end(); I != E; ++I) {
+ for (const_capture_iterator I = capture_begin(),
+ E = capture_end(); I != E; ++I) {
if (I->capturesThis())
continue;