Implement template support for CapturedStmt
- Sema tests added and CodeGen tests are pending
Differential Revision: http://llvm-reviews.chandlerc.com/D728
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181101 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Serialization/ASTReaderStmt.cpp b/lib/Serialization/ASTReaderStmt.cpp
index 5d72614..e1357ba 100644
--- a/lib/Serialization/ASTReaderStmt.cpp
+++ b/lib/Serialization/ASTReaderStmt.cpp
@@ -382,8 +382,9 @@
void ASTStmtReader::VisitCapturedStmt(CapturedStmt *S) {
VisitStmt(S);
- S->TheCapturedDecl = ReadDeclAs<CapturedDecl>(Record, Idx);
- S->TheRecordDecl = ReadDeclAs<RecordDecl>(Record, Idx);
+ S->setCapturedDecl(ReadDeclAs<CapturedDecl>(Record, Idx));
+ S->setCapturedRegionKind(static_cast<CapturedRegionKind>(Record[Idx++]));
+ S->setCapturedRecordDecl(ReadDeclAs<RecordDecl>(Record, Idx));
// Capture inits
for (CapturedStmt::capture_init_iterator I = S->capture_init_begin(),
@@ -393,7 +394,7 @@
// Body
S->setCapturedStmt(Reader.ReadSubStmt());
- S->TheCapturedDecl->setBody(S->getCapturedStmt());
+ S->getCapturedDecl()->setBody(S->getCapturedStmt());
// Captures
for (CapturedStmt::capture_iterator I = S->capture_begin(),