aboutsummaryrefslogtreecommitdiff
path: root/lib/Index/ASTVisitor.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Index/ASTVisitor.h')
-rw-r--r--lib/Index/ASTVisitor.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Index/ASTVisitor.h b/lib/Index/ASTVisitor.h
index 0ae78fb74ff4..943c72025312 100644
--- a/lib/Index/ASTVisitor.h
+++ b/lib/Index/ASTVisitor.h
@@ -52,8 +52,8 @@ public:
void VisitDeclaratorDecl(DeclaratorDecl *D) {
BaseDeclVisitor::VisitDeclaratorDecl(D);
- if (DeclaratorInfo *DInfo = D->getDeclaratorInfo())
- Visit(DInfo->getTypeLoc());
+ if (TypeSourceInfo *TInfo = D->getTypeSourceInfo())
+ Visit(TInfo->getTypeLoc());
}
void VisitFunctionDecl(FunctionDecl *D) {
@@ -104,7 +104,7 @@ public:
}
void VisitBlockExpr(BlockExpr *Node) {
- Visit(Node->getBlockDecl());
+ // The BlockDecl is also visited by 'VisitDeclContext()'. No need to visit it twice.
}
void VisitStmt(Stmt *Node) {