]> granicus.if.org Git - clang/commitdiff
Always use getDerived().shouldVisitImplicitCode() so it can be altered
authorDaniel Jasper <djasper@google.com>
Tue, 26 Jun 2012 22:15:38 +0000 (22:15 +0000)
committerDaniel Jasper <djasper@google.com>
Tue, 26 Jun 2012 22:15:38 +0000 (22:15 +0000)
in subclasses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159231 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/RecursiveASTVisitor.h

index 4ad9da30e10d78f956eba3270e387f5dbfaa0082..1a61255f04744677f5f8c63fe0c5dc4e7227879f 100644 (file)
@@ -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()));