forked from OSchip/llvm-project
parent
d0cb85b62d
commit
5fe4122348
|
@ -42,13 +42,13 @@ TEST(RecursiveASTVisitor, VisitsLambdaExpr) {
|
||||||
LambdaExprVisitor Visitor;
|
LambdaExprVisitor Visitor;
|
||||||
Visitor.ExpectMatch("", 1, 12);
|
Visitor.ExpectMatch("", 1, 12);
|
||||||
EXPECT_TRUE(Visitor.runOver("void f() { []{ return; }(); }",
|
EXPECT_TRUE(Visitor.runOver("void f() { []{ return; }(); }",
|
||||||
LambdaExprVisitor::Lang_CXX11));
|
LambdaExprVisitor::Lang_CXX11));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(RecursiveASTVisitor, TraverseLambdaBodyCanBeOverridden) {
|
TEST(RecursiveASTVisitor, TraverseLambdaBodyCanBeOverridden) {
|
||||||
LambdaExprVisitor Visitor;
|
LambdaExprVisitor Visitor;
|
||||||
EXPECT_TRUE(Visitor.runOver("void f() { []{ return; }(); }",
|
EXPECT_TRUE(Visitor.runOver("void f() { []{ return; }(); }",
|
||||||
LambdaExprVisitor::Lang_CXX11));
|
LambdaExprVisitor::Lang_CXX11));
|
||||||
EXPECT_TRUE(Visitor.allBodiesHaveBeenTraversed());
|
EXPECT_TRUE(Visitor.allBodiesHaveBeenTraversed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,8 +92,7 @@ private:
|
||||||
|
|
||||||
TEST(RecursiveASTVisitor, LambdaClosureTypesAreImplicit) {
|
TEST(RecursiveASTVisitor, LambdaClosureTypesAreImplicit) {
|
||||||
ClassVisitor Visitor;
|
ClassVisitor Visitor;
|
||||||
EXPECT_TRUE(Visitor.runOver("auto lambda = []{};",
|
EXPECT_TRUE(Visitor.runOver("auto lambda = []{};", ClassVisitor::Lang_CXX11));
|
||||||
ClassVisitor::Lang_CXX11));
|
|
||||||
EXPECT_TRUE(Visitor.sawOnlyImplicitLambdaClasses());
|
EXPECT_TRUE(Visitor.sawOnlyImplicitLambdaClasses());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue