[PATCH] Expose LambdaIntroducer::DefaultLoc in the AST's LambdaExpr.
James Dennett
jdennett at google.com
Sat Jul 20 18:59:48 PDT 2013
On Sat, Jul 20, 2013 at 6:54 PM, James Dennett <jdennett at google.com> wrote:
> jdennett added you to the CC list for the revision "Expose LambdaIntroducer::DefaultLoc in the AST's LambdaExpr.".
>
> Source-centric tools need access to the location of a C++11
> lambda expression's capture-default ('&' or '=') when it's present.
> It's possible for them to find it by re-lexing and re-implementing
> rules that Clang's parser has already applied, but the cost of storing
> the SourceLocation and making it available to them is 32 bits per
> LambdaExpr (a small delta, proportionally), and the simplification in
> client code is significant.
>
> http://llvm-reviews.chandlerc.com/D1192
I have some rather indirect tests for this (e.g., a
RecursiveASTVisitor that checks that a match is found at the right
place), but I'd like to have tests that are closer to the
modifications. In particular, I'd like to include a test that the new
LambdaExpr field survives serialization/deserialization. A quick
survey of the code wasn't sufficient to find where those tests should
live.
Any feedback is welcome (even if it's just "take this discussion to cfe-dev").
Thanks,
James
More information about the cfe-commits
mailing list