llvm-project/clang/unittests/Tooling
Martin Bohme 78bac52e14 Make RecursiveASTVisitor visit lambda capture initialization expressions
Summary:
Lambda capture initializations are part of the explicit source code and
therefore should be visited by default but, so far, RecursiveASTVisitor does not
visit them.

This appears to be an oversight. Because the lambda body needs custom handling
(calling TraverseLambdaBody()), the DEF_TRAVERSE_STMT for LambdaExpr sets
ShouldVisitChildren to false but then neglects to visit the lambda capture
initializations. This patch adds code to visit the expressions associated with
lambda capture initializations.

Reviewers: klimek

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D22566

llvm-svn: 277342
2016-08-01 12:15:46 +00:00
..
CMakeLists.txt [tooling] FixItHint Tooling refactoring 2016-05-11 14:31:39 +00:00
CommentHandlerTest.cpp Wdeprecated: CommentVerifiers are returned by value, make sure they're correctly copy/moveable 2015-08-13 21:24:08 +00:00
CompilationDatabaseTest.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
FixItTest.cpp [tooling] FixItHint Tooling refactoring 2016-05-11 14:31:39 +00:00
LookupTest.cpp [Tooling] skip anonymous namespaces when checking if typeLoc references a type decl from a different canonical namespace. 2016-07-26 14:53:05 +00:00
QualTypeNamesTest.cpp [Tooling] Add optional argument to getFullyQualifiedName to prepend "::". 2016-06-29 22:38:59 +00:00
RecursiveASTVisitorTest.cpp Let RecursiveASTVisitor visit array index VarDecls 2016-01-22 15:11:54 +00:00
RecursiveASTVisitorTestCallVisitor.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
RecursiveASTVisitorTestDeclVisitor.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
RecursiveASTVisitorTestExprVisitor.cpp Make RecursiveASTVisitor visit lambda capture initialization expressions 2016-08-01 12:15:46 +00:00
RecursiveASTVisitorTestTypeLocVisitor.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
RefactoringCallbacksTest.cpp Rename AST node matchers to match the AST node names directly. Part of this rename also splits recordDecl() (which used to match CXXRecordDecl) into recordDecl() (that matches RecordDecl) and cxxRecordDecl (that matches CXXRecordDecl). Also adds isStruct(), isUnion(), and isClass() narrowing matchers for RecordDecl objects. 2015-09-17 13:30:52 +00:00
RefactoringTest.cpp Implement tooling::Replacements as a class. 2016-08-01 10:16:37 +00:00
ReplacementTest.h Implement tooling::Replacements as a class. 2016-08-01 10:16:37 +00:00
ReplacementsYamlTest.cpp Do not quote YAML plain string myself. Let YAMLIO do that. 2013-09-11 04:00:35 +00:00
RewriterTest.cpp Implement tooling::Replacements as a class. 2016-08-01 10:16:37 +00:00
RewriterTestContext.h Roll-back r250822. 2015-10-20 13:23:58 +00:00
TestVisitor.h Roll-back r250822. 2015-10-20 13:23:58 +00:00
ToolingTest.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00