forked from OSchip/llvm-project
[NFC][clang][PCH][ObjC] Add some missing `VisitStmt(S);`
Summary: These ObjC AST classes inherit from Stmt, but don't call `VisitStmt(S);`. Some were founded with help of existing tests (with `NumStmtFields` bumped to `1`), but some of them don't even have PCH test coverage. :/ Reviewers: arphaman, sammccall, smeenai, aprantl, rsmith, jordan_rose Reviewed By: jordan_rose Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59197 llvm-svn: 355987
This commit is contained in:
parent
8ef3da494c
commit
773c391d4a
|
@ -1254,7 +1254,7 @@ void ASTStmtReader::VisitObjCAtFinallyStmt(ObjCAtFinallyStmt *S) {
|
|||
}
|
||||
|
||||
void ASTStmtReader::VisitObjCAutoreleasePoolStmt(ObjCAutoreleasePoolStmt *S) {
|
||||
VisitStmt(S);
|
||||
VisitStmt(S); // FIXME: no test coverage.
|
||||
S->setSubStmt(Record.readSubStmt());
|
||||
S->setAtLoc(ReadSourceLocation());
|
||||
}
|
||||
|
@ -1274,14 +1274,14 @@ void ASTStmtReader::VisitObjCAtTryStmt(ObjCAtTryStmt *S) {
|
|||
}
|
||||
|
||||
void ASTStmtReader::VisitObjCAtSynchronizedStmt(ObjCAtSynchronizedStmt *S) {
|
||||
VisitStmt(S);
|
||||
VisitStmt(S); // FIXME: no test coverage.
|
||||
S->setSynchExpr(Record.readSubStmt());
|
||||
S->setSynchBody(Record.readSubStmt());
|
||||
S->setAtSynchronizedLoc(ReadSourceLocation());
|
||||
}
|
||||
|
||||
void ASTStmtReader::VisitObjCAtThrowStmt(ObjCAtThrowStmt *S) {
|
||||
VisitStmt(S);
|
||||
VisitStmt(S); // FIXME: no test coverage.
|
||||
S->setThrowExpr(Record.readSubStmt());
|
||||
S->setThrowLoc(ReadSourceLocation());
|
||||
}
|
||||
|
|
|
@ -1198,6 +1198,7 @@ void ASTStmtWriter::VisitObjCForCollectionStmt(ObjCForCollectionStmt *S) {
|
|||
}
|
||||
|
||||
void ASTStmtWriter::VisitObjCAtCatchStmt(ObjCAtCatchStmt *S) {
|
||||
VisitStmt(S);
|
||||
Record.AddStmt(S->getCatchBody());
|
||||
Record.AddDeclRef(S->getCatchParamDecl());
|
||||
Record.AddSourceLocation(S->getAtCatchLoc());
|
||||
|
@ -1206,18 +1207,21 @@ void ASTStmtWriter::VisitObjCAtCatchStmt(ObjCAtCatchStmt *S) {
|
|||
}
|
||||
|
||||
void ASTStmtWriter::VisitObjCAtFinallyStmt(ObjCAtFinallyStmt *S) {
|
||||
VisitStmt(S);
|
||||
Record.AddStmt(S->getFinallyBody());
|
||||
Record.AddSourceLocation(S->getAtFinallyLoc());
|
||||
Code = serialization::STMT_OBJC_FINALLY;
|
||||
}
|
||||
|
||||
void ASTStmtWriter::VisitObjCAutoreleasePoolStmt(ObjCAutoreleasePoolStmt *S) {
|
||||
VisitStmt(S); // FIXME: no test coverage.
|
||||
Record.AddStmt(S->getSubStmt());
|
||||
Record.AddSourceLocation(S->getAtLoc());
|
||||
Code = serialization::STMT_OBJC_AUTORELEASE_POOL;
|
||||
}
|
||||
|
||||
void ASTStmtWriter::VisitObjCAtTryStmt(ObjCAtTryStmt *S) {
|
||||
VisitStmt(S);
|
||||
Record.push_back(S->getNumCatchStmts());
|
||||
Record.push_back(S->getFinallyStmt() != nullptr);
|
||||
Record.AddStmt(S->getTryBody());
|
||||
|
@ -1230,6 +1234,7 @@ void ASTStmtWriter::VisitObjCAtTryStmt(ObjCAtTryStmt *S) {
|
|||
}
|
||||
|
||||
void ASTStmtWriter::VisitObjCAtSynchronizedStmt(ObjCAtSynchronizedStmt *S) {
|
||||
VisitStmt(S); // FIXME: no test coverage.
|
||||
Record.AddStmt(S->getSynchExpr());
|
||||
Record.AddStmt(S->getSynchBody());
|
||||
Record.AddSourceLocation(S->getAtSynchronizedLoc());
|
||||
|
@ -1237,6 +1242,7 @@ void ASTStmtWriter::VisitObjCAtSynchronizedStmt(ObjCAtSynchronizedStmt *S) {
|
|||
}
|
||||
|
||||
void ASTStmtWriter::VisitObjCAtThrowStmt(ObjCAtThrowStmt *S) {
|
||||
VisitStmt(S); // FIXME: no test coverage.
|
||||
Record.AddStmt(S->getThrowExpr());
|
||||
Record.AddSourceLocation(S->getThrowLoc());
|
||||
Code = serialization::STMT_OBJC_AT_THROW;
|
||||
|
|
Loading…
Reference in New Issue