]> granicus.if.org Git - clang/commitdiff
Tweak a comment on the visitor to clarify one order of visit issue. Patch from
authorChandler Carruth <chandlerc@gmail.com>
Thu, 10 Jun 2010 23:27:51 +0000 (23:27 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 10 Jun 2010 23:27:51 +0000 (23:27 +0000)
Zhanyong Wan.

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

include/clang/AST/RecursiveASTVisitor.h

index b6f7342ceaad6ac938f387219a93fe7278476bb9..5a8a3f7c69b88a8432777b49a0b4ccfa5d932ee0 100644 (file)
@@ -70,6 +70,12 @@ namespace clang {
 /// tier (e.g. other Traverse*) or one tier lower (e.g. WalkUpFrom*).
 /// It may not call methods from a higher tier.
 ///
+/// Note that since WalkUpFromFoo() calls WalkUpFromBar() (where Bar
+/// is Foo's super class) before calling VisitFoo(), the result is
+/// that the Visit*() methods for a given node are called in the
+/// top-down order (e.g. for a node of type NamedDecl, the order will
+/// be VisitDecl(), VisitNamedDecl(), and then VisitNamespaceDecl()).
+///
 /// This scheme guarantees that all Visit*() calls for the same AST
 /// node are grouped together.  In other words, Visit*() methods for
 /// different nodes are never interleaved.