[PATCH] D56444: [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 8 08:50:54 PST 2019
sammccall created this revision.
sammccall added reviewers: aaron.ballman, JonasToth.
Herald added a subscriber: cfe-commits.
This fixes ASTContext's parent map for nodes in such classes (e.g. operator()).
https://bugs.llvm.org/show_bug.cgi?id=39949
In order to do this, we remove the TraverseLambdaBody hook. The problem is it's
hard/weird to ensure this hook is called when traversing via the implicit class.
There were just two users of this hook in-tree, who use it to skip bodies.
I replaced these with explicitly traversing the captures only. Another approach
would be recording the bodies when the lambda is visited, and then recognizing
them later.
I'd be open to suggestion on how to preserve this hook, instead.
Repository:
rC Clang
https://reviews.llvm.org/D56444
Files:
include/clang/AST/RecursiveASTVisitor.h
lib/CodeGen/CodeGenPGO.cpp
lib/Sema/AnalysisBasedWarnings.cpp
unittests/AST/ASTContextParentMapTest.cpp
unittests/Tooling/RecursiveASTVisitorTests/LambdaExpr.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56444.180684.patch
Type: text/x-patch
Size: 8379 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190108/bb0c91a1/attachment.bin>
More information about the cfe-commits
mailing list