r276759 - Revert "Make RecursiveASTVisitor visit lambda capture initialization expressions"
Martin Bohme via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 26 09:01:55 PDT 2016
Author: mboehme
Date: Tue Jul 26 11:01:55 2016
New Revision: 276759
URL: http://llvm.org/viewvc/llvm-project?rev=276759&view=rev
Log:
Revert "Make RecursiveASTVisitor visit lambda capture initialization expressions"
This reverts commit r276755.
(Broke clang-tidy check modernize-loop-convert.)
Modified:
cfe/trunk/include/clang/AST/RecursiveASTVisitor.h
cfe/trunk/unittests/Tooling/RecursiveASTVisitorTestExprVisitor.cpp
Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/RecursiveASTVisitor.h?rev=276759&r1=276758&r2=276759&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/RecursiveASTVisitor.h (original)
+++ cfe/trunk/include/clang/AST/RecursiveASTVisitor.h Tue Jul 26 11:01:55 2016
@@ -2266,9 +2266,6 @@ DEF_TRAVERSE_STMT(LambdaExpr, {
C != CEnd; ++C) {
TRY_TO(TraverseLambdaCapture(S, C));
}
- for (Expr *Init : S->capture_inits()) {
- TRY_TO_TRAVERSE_OR_ENQUEUE_STMT(Init);
- }
TypeLoc TL = S->getCallOperator()->getTypeSourceInfo()->getTypeLoc();
FunctionProtoTypeLoc Proto = TL.castAs<FunctionProtoTypeLoc>();
Modified: cfe/trunk/unittests/Tooling/RecursiveASTVisitorTestExprVisitor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/RecursiveASTVisitorTestExprVisitor.cpp?rev=276759&r1=276758&r2=276759&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/RecursiveASTVisitorTestExprVisitor.cpp (original)
+++ cfe/trunk/unittests/Tooling/RecursiveASTVisitorTestExprVisitor.cpp Tue Jul 26 11:01:55 2016
@@ -191,14 +191,6 @@ TEST(RecursiveASTVisitor, VisitsCallExpr
"void x(); void y() { x(); }"));
}
-TEST(RecursiveASTVisitor, VisitsLambdaCaptureInit) {
- DeclRefExprVisitor Visitor;
- Visitor.ExpectMatch("i", 1, 20);
- EXPECT_TRUE(Visitor.runOver(
- "void f() { int i; [i]{}; };",
- DeclRefExprVisitor::Lang_CXX11));
-}
-
/* FIXME: According to Richard Smith this is a bug in the AST.
TEST(RecursiveASTVisitor, VisitsBaseClassTemplateArgumentsInInstantiation) {
DeclRefExprVisitor Visitor;
More information about the cfe-commits
mailing list