[PATCH] Make RecursiveASTVisitor::TraverseLambdaExpr call WalkUpFromLambdaExpr

James Dennett jdennett at google.com
Fri Jun 28 01:10:26 PDT 2013


I believe that there's a bug in
RecursiveASTVisitor::TraverseLambdaExpr, in that it fails to actually
call the Visit* functions on the LambdaExpr itself, while the
documentation (and desired behavior) says that TraverseFoo(x) should
call WalkUpFromFoo(x) and then recursively visit x's children.

This patch adds in the obvious call to WalkUpFromLambdaExpr, and a
test (that fails with the current RecursiveASTVisitor and passes with
the fixed version).

The test depends on a previous patch I've just sent for review ("Allow
TestVisitor-based tests to specify use of C++11").

Please take a look.

-- James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: visit-lambda-expr.patch
Type: application/octet-stream
Size: 2136 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130628/1fbeab06/attachment.obj>


More information about the cfe-commits mailing list