[cfe-commits] r168022 - in /cfe/trunk: lib/ASTMatchers/ASTMatchFinder.cpp unittests/ASTMatchers/ASTMatchersTest.cpp

Daniel Jasper djasper at google.com
Wed Nov 14 20:20:35 PST 2012


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.
Or is that wrong? Is there more documentation on what the RAV is
supposed to do?

On Wed, Nov 14, 2012 at 7:42 PM, Richard Smith <richard at metafoo.co.uk> wrote:
> On Wed, Nov 14, 2012 at 7:29 PM, Daniel Jasper <djasper at google.com> wrote:
>> Author: djasper
>> Date: Wed Nov 14 21:29:05 2012
>> New Revision: 168022
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=168022&view=rev
>> Log:
>> Do not use data recursion in ASTMatchFinder.
>>
>> The matchers rely on the complete AST being traversed as shown by the new test cases.
>>
>> Modified:
>>     cfe/trunk/lib/ASTMatchers/ASTMatchFinder.cpp
>>     cfe/trunk/unittests/ASTMatchers/ASTMatchersTest.cpp
>>
>> Modified: cfe/trunk/lib/ASTMatchers/ASTMatchFinder.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ASTMatchers/ASTMatchFinder.cpp?rev=168022&r1=168021&r2=168022&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/ASTMatchers/ASTMatchFinder.cpp (original)
>> +++ cfe/trunk/lib/ASTMatchers/ASTMatchFinder.cpp Wed Nov 14 21:29:05 2012
>> @@ -58,6 +58,9 @@
>>
>>    bool shouldVisitTemplateInstantiations() const { return true; }
>>    bool shouldVisitImplicitCode() const { return true; }
>> +  // Disables data recursion. We intercept Traverse* methods in the RAV, which
>> +  // are not triggered during data recursion.
>
> RAV calls the Traverse* methods if they've been overridden. If that's
> not working for you, we should fix it in RAV itself.



More information about the cfe-commits mailing list