forked from OSchip/llvm-project
Always use getDerived().shouldVisitImplicitCode() so it can be altered
in subclasses. llvm-svn: 159231
This commit is contained in:
parent
319be53a1f
commit
105da6f7c4
|
@ -1762,7 +1762,7 @@ bool RecursiveASTVisitor<Derived>::TraverseVarHelper(VarDecl *D) {
|
|||
TRY_TO(TraverseDeclaratorHelper(D));
|
||||
// Default params are taken care of when we traverse the ParmVarDecl.
|
||||
if (!isa<ParmVarDecl>(D) &&
|
||||
(!D->isCXXForRangeDecl() || shouldVisitImplicitCode()))
|
||||
(!D->isCXXForRangeDecl() || getDerived().shouldVisitImplicitCode()))
|
||||
TRY_TO(TraverseStmt(D->getInit()));
|
||||
return true;
|
||||
}
|
||||
|
@ -1881,7 +1881,7 @@ DEF_TRAVERSE_STMT(ObjCAtTryStmt, { })
|
|||
DEF_TRAVERSE_STMT(ObjCForCollectionStmt, { })
|
||||
DEF_TRAVERSE_STMT(ObjCAutoreleasePoolStmt, { })
|
||||
DEF_TRAVERSE_STMT(CXXForRangeStmt, {
|
||||
if (!shouldVisitImplicitCode()) {
|
||||
if (!getDerived().shouldVisitImplicitCode()) {
|
||||
TRY_TO(TraverseStmt(S->getLoopVarStmt()));
|
||||
TRY_TO(TraverseStmt(S->getRangeInit()));
|
||||
TRY_TO(TraverseStmt(S->getBody()));
|
||||
|
|
Loading…
Reference in New Issue