Always use getDerived().shouldVisitImplicitCode() so it can be altered
in subclasses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159231 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/AST/RecursiveASTVisitor.h b/include/clang/AST/RecursiveASTVisitor.h
index 4ad9da3..1a61255 100644
--- a/include/clang/AST/RecursiveASTVisitor.h
+++ b/include/clang/AST/RecursiveASTVisitor.h
@@ -1762,7 +1762,7 @@
   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(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()));