[cfe-commits] r168022 - in /cfe/trunk: lib/ASTMatchers/ASTMatchFinder.cpp unittests/ASTMatchers/ASTMatchersTest.cpp
Richard Smith
richard at metafoo.co.uk
Wed Nov 14 23:11:16 PST 2012
On Wed, Nov 14, 2012 at 9:04 PM, Philip Craig <philipjcraig at gmail.com> wrote:
> On Thu, Nov 15, 2012 at 2:20 PM, Daniel Jasper <djasper at google.com> wrote:
>> But we are not overwriting all the Traverse* methods, so I am
>> thinking, we might not be overwriting one somewhere in the middle of
>> the recursion and then the ones further down the chain are not called.
That shouldn't matter. If you've overridden a Traverse* function, it
should be called.
> All calls to methods that can be overwritten should be via
> getDerived(), so methods further down the chain should still be
> called. The comment before the TRY_TO macro hints at this. There might
> be a call somewhere that is missing the getDerived().
That's not it. RAV's dataTraverse function skips the calls to
Traverse* in some cases, to avoid using up stack space during
traversal. This is supposed to be skipped if the Traverse* function in
question is overridden in the derived class (see DISPATCH_WALK in
RAV's dataTraverseNode).
More information about the cfe-commits
mailing list