forked from OSchip/llvm-project
In ASTVisitor, call the correct base methods.
llvm-svn: 83110
This commit is contained in:
parent
edd1129c36
commit
9c28a3d13c
|
@ -48,24 +48,24 @@ public:
|
|||
}
|
||||
|
||||
void VisitFunctionDecl(FunctionDecl *D) {
|
||||
BaseDeclVisitor::VisitValueDecl(D);
|
||||
BaseDeclVisitor::VisitFunctionDecl(D);
|
||||
if (D->isThisDeclarationADefinition())
|
||||
Visit(D->getBody());
|
||||
}
|
||||
|
||||
void VisitObjCMethodDecl(ObjCMethodDecl *D) {
|
||||
BaseDeclVisitor::VisitNamedDecl(D);
|
||||
BaseDeclVisitor::VisitObjCMethodDecl(D);
|
||||
if (D->getBody())
|
||||
Visit(D->getBody());
|
||||
}
|
||||
|
||||
void VisitBlockDecl(BlockDecl *D) {
|
||||
BaseDeclVisitor::VisitDecl(D);
|
||||
BaseDeclVisitor::VisitBlockDecl(D);
|
||||
Visit(D->getBody());
|
||||
}
|
||||
|
||||
void VisitVarDecl(VarDecl *D) {
|
||||
BaseDeclVisitor::VisitValueDecl(D);
|
||||
BaseDeclVisitor::VisitVarDecl(D);
|
||||
if (Expr *Init = D->getInit())
|
||||
Visit(Init);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue