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>();
"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;